The optimize function always started nearest-neighbor from the first array element, ignoring where the traveler actually is after preceding anchors (flights, lodging). Now passes the preceding anchor's exit coordinates (destination for transportation) so the algorithm picks the spatially nearest item as the starting point.