code grooming on app.js