breaking down the app.js file for mvc