Organize app.js file