Initial work on Metadata class. Started using it in store.savedoc