Rework threading in Recorder.cs and add playback capabilities in Playback.cs