Merge improvedmanualsort