simplifying app.js