Refactoring.
Merge sort implemented.