Changes the router module to enable easier testing