Added a cancel functionality and other fixes for autonomous