Fixing issues with app.js