Refactor routes to allow for io inside the routes instead of inside app.js