Autonomous mode and some cleanup