Updated shortest_dist_node to use heap names dictionary.