Change MinHeap class to more generic Heap.