Fixed case of tests.
Switched to delgating constructors for safety.
Move from raw pointers in metadata to shared_ptr.
Adding tests for field serialization/deserialization.