Implementing a Priority Queue as a Heap