Revert "Revert premature merge of metadata branch"
Merge pull request #598 from subvertallchris/v4-dev_metadata_and_rel_types

Merge v4 changes: metadata instead of classname, rel transformations