Refactored Metadata, implemented test suite