Begin refactor to run mergeSort as precursor process, abstracting out one function for sorting by both x and y