replace route instantiation with RouteFactory.