fix merge and add Heap (In progress).