Added min-heap, corrected heap-extract-max function