First implementation of Mergesort.