Added Cartesian, Consume and Distinct, plus tests.