New Metadata graph implementation

Includes reorientation and serialization functionality.