Finally got mergesort to work. Thank the lord.