Fixed bug causing incorrect result on sorting 1001 integers. 

Previously: Splitting into subarrays incorrectly, ie split 5 elems into
4 subarrays as [2,2,1,0]

Now: Splitting to [2,1,1,1]

Code is super hacky! Will refactor on next commit.
Refactored code