moving the router stuff out of node modules