Change sort method

Improve sort method using quicksort. Compare tow different methods.