Simplifying index.js by extracting core/routes.js