Initial generation

Does the basic stuff for the algorithm, plus a little script for running through it