Factored out routes from app.js