cleaned up priority queue a bit