Clean up/organize app.js and add better comments