Better toMetadata