Updated app.js with comments