Add quicksort function and unit tests