Refactor routeObject.