cleaned up database.php