Heapsort improved