simplify and make app.js more single minded