Refactor the `host_routes` logic a bit.