fixing xml compression
Refactoring metadata registry into its own class.