Added preliminary support for waypoints.