Metadata extraction