Trip planner code cleaning