Are there any PHP scripts I need to use to clean up after I use one of the PHP's database commands? And is there anyway I can make my PHP scripts run faster?
You don't need to clean up after using a database. As soon as the script terminates the connection should automatically terminate. PHP is pretty fast. The speed decreases are usually the fault of either an overloaded server or MySQL being poorly configured or overloaded. Occasionally PHP geeks don't have a good grasp on database design and forget to index correctly which will cause slowdowns when issuing queries. You can cache PHP scripts using something like mmcache but that's usually completely unnecessary unless you have a very busy site.