clean up k-shortest paths + find optimum paths