re-write app.js and dashboard-controller.js in coffeescript