make metadata storage pluggable

same with all the Map<String,Object> return types below