Adding MaxHeap and other changes