More app.js cleanup