simplify app.js
refactor app.js