My implementation of a heap.