Added merge sort implementation.