Changed the mergeSort so that it doen't create a lot of duplcates of the array to be sortedw