Code duplication removed.
Minor cleanup regarding waypoint manager and MarkIcon.