Completed part 3--generating a MST using Kruskal's algorithm.