adds comments to class.DB.php and generally neatens code structure