make metadata storage pluggable

i think we should just always use a validation query