Updated version of Kruskal

Commented and changed slightly