small code cleanup on app.js