Removed unneeded code from mid_max_sum.