Merged the Cartesian product code into Indexed.