Cleanup of quicksort implementation.