Primitive Quicksort implementation