Encapsulated MetaData members. Added helper functions for common tasks.

Now 4 test cases.