Made minFreq a function variable rather than a class field.