Add user defined object argument to mergeSort and update Scene to not create a new function every frame.