modularized code
merge conflicts fixed, app.js file updated