Refactored recorder internals.