Move nested record fetching logic out into its own class
Merge pull request #749 from hudmol/nested-record-cleanup

Move nested record fetching logic out into its own class