Revamp mergesort