Made shellsort generic