Improved QuickSort's algorithm and added some comments.