added JSDocs style comments to rest of app.js