External swap function was not working; replaced with a #define
Converting heapsort from int array to DArray