Refactored out some variables to make easier to read
Added recording status events and refactored recording loop to be separate from previously recorded loops
Some final clean-up refactoring and added loop reset