Minor start on some of the C implementation

* Rudimentary linked list implemented for storing cartesian products
* Moved the cartesian product to its own file for when that inevitably
  changes