Only allow one instance of a metadata type per document
Simplify and improve document metadata views, improve docstrings