Woah tons of changes, rewrote the cycle code and fixed a bounds checking bug in build_partitions().