recording on separate task; playing back works now

The recording part is now done on a separate task, allowing the UI to be
responsive. The playing back part now fully works.
Small design changes.