Implemented recording stuff.