Re-structured the database creation scripts