Refactor MetadataRecords.