Waypoint entity behavior. Minor refactoring.