Updating Node and A* to use a priority queue