More refactoring into AbstractMetadata