Fixed bug with improper casting of boolean metadata field to an actual boolean.
Heavy handed refactoring of Metadata and Metadatafield class.
Merge commit 'abf1475a524b8eec8c017b6a78730827bf55795b' into feature/rest-api
Refactor & bugfixing MetadataField refactoring
Merge commit '43fa26dc7f3ce3ad3495e1e2781a62478a1f3b88' into feature/rest-api
MetadataField bugfixes after testing
Merge commit 'd963c7159ff36bc6b2b9be0d84c8265ec6d35544' into feature/rest-api