make metadata storage pluggable

can we make this global?