640 project management

This branch adds management for *all the metadata* types except for categories.
It fixes several problems with the code as it was before.
Also, it is a major cleanup of the previous code.
Additionally, the formats button in the ontologies view is removed.

This fixes #640, #659 and #699