Update main
Improve quick sort
Improve code