Fixing cutoff in tree and reducing complexity, also adding tests for generated graphs. Seems to work.
Merge remote-tracking branch 'origin/master'