refactored ValueDb STASH
generified Type class
refactored ValueDb to use Type generic argument