Reverse overzealous refactoring in app.js