Freed the maxIndexes and maxes arrays