seperated out application creation and config from events.js into app.js