Added missing Double, vectorized tests.
Tweaks to pass unit tests.