REF: move some metadat functions into a remote dat