Changed name of prim to dijkstra. It now returns MST, weight sum and the diameter of the MST. The MST with the smallest diameter is selected as a tie break.