Edited some code and added comments

Comments added only for the QuickSort and MergeSort functions.