Taking functionality out of the app.js file so that we can switch between database and no database and do stuff for testing.