Finished updated Kruskal implementation