Updated turning and loop functions to use RESET. Needs testing.