Refactor insertion sort
Refactor quicksort.