Simple quicksort implementation