Implementing a Heap/Priority Queueu