DBref support

For issue #191

It's kind of quick and dirty but it worked for me.  I'm not sure about the support for arrays.  Still playing with that.