updated app.js and html template files