Made app.js neater