Mergesort improvements