Refactored app.js
Fixed refactor to app.js