Refactoring app.js
Removing unused method