Primo: make data extraction slightly more general

Now tested locally. Also added some comments etc.
Is this actually necessary? Every catalog I looked at had //display/type. Do you have an example? I also don't like taking metadata from facets/search for the reasons @zuphilip outlined previously.