Improved test utility, added extra vector tests.
Test uncovered vector bugs that need addressing.