Removed useless vars and comments
Reindent php files
Missing mdb2 require in lib/common.php
Update for multiple databases instances