Refactor app.js
Merge conflicting app.js