Merge sort implementation (besides length no BIF)