Issue 1861 - recorder refactoring

Submitting for early review. There's likely a few things that haven't been included yet most notably fetchEmbeddedResources plus some unit tests which should be filled out over time.