Merge pull request #51 from Ralith/encode-metadata-type

Support for encoding metadata types and instruction metadata