refactored QuickSort partition alogrithm to fix bugs when adding incrementaly after the less compare
tidied up code