Added code for itinerary computation.