Implement the router. All tests should pass.