Fixes to app.js