Metadata extraction engine