MMAlgo: refactored - removed field "median", incapsulated insertion
calls to heaps