for the defaults: i would do a constructor on this class where you can give key, value and type but type could be optional and default to the most common case.