Code cleanup in app.js