some refactoring relative to the persistence of metadata on the client