Merge sort now works, but have only tested with arrays that are of length power of 2.