Saving...
app.js loosened and less encapsulated. Consider moving the functions to another .js file later.