fixed heapsort_gather bug, improved Makefile