Refactored 'max' feature.