Refactored heaps