This stops a cyclic import. Move add_route, mount and endpoint_to_controller into tools/routing.py and change all callers.