common.php cleanup and sql structure file

Cleaned up common.php, moved db specifics into config.php and added
mysql db structure description file