Some refactoring on the app.js

Signed-off-by: Ryan Holder <ryan@ryanholder.com>
Some comments in code to provide explanations and links to google dev docs

Signed-off-by: Ryan Holder <ryan@ryanholder.com>
Merge pull request #3 from cityindex/feature/refactor-app-js

Code refactor and comments