Refactored reset-database and db-populate-data