Modularized controller. Added app.js.