Converted concrete implementation of merge sort into a generic version, as it should be.