Refactor the itinerary finder.
Refactor the itinerary finder.