Refactor & bugfixing MetadataField refactoring