Updated code to use efficient RouteCollection route retrieval methods