Completed and tested merge sort.