Adding more heapsort code