Separating code out of app.js.