Finished span tree alg. Not 100% done, still need non-determinism and to fix output.