Metadata

This adds support and testing for metadata via putting a JSON object of key-values.