template clean up and app.js