Refactored enumerable min and max methods to increase code metrics.