Refactored Background Recorder into bgRecorder