Fixed some ugliness with generics in Mergesort