Changed priority queue to goog.structs.PriorityQueue