Refactored autonomous code.  Functionally the same but I removed some redundancy and corrected the spelling mistakes.