Refactored the way a route is determined from ['route']