Refactored query for readability
Refactored /RouteFactory for readability