Cleaned up recursive quicksort algorithm