draft changes to public app.js
fixed merge conflicts