a bunch of fixes and cleanup in outputrecording