fix return value of MaxHeap.pop, yet not used anyway
replace single-line functions and methods with lambda