Modified tests to reflect recent db driver changes.
Improved varstream input/ouput