Made lint happy.
Modularized cleanup, fixed waypoint deletion.