Almost finished, just the generate successors function left (v0.1.5.a22)