Use type & field builders in MetadataRepository code to refactor code (WIP).