Redesign priority queue for priority donation

It's a really tough work for task 4, grinding!