Cleaned up edit_database and made a few schema changes as a result