Use sort wrapper and implementation. Fix merge sort