Added some comments to app.js and cleaned it up.