Encapsulated MetaData members. Added helper functions for common tasks.

Consider replacing this with a set_directory_id() method