fixed some issues with quick sort partition routine.
Added in place sorting