Reorganize code, remove priorityqueue usage from serial kruskal