Update app.js

Cleaning up app code.