clean up code in app.js file.