Generalization almost done. Just need to make metadata selector work.
Generalized metadata works - needs polish