Finished basic merge sort algorithm