Metadata layer

Proposed initial interface design for issue #23 .