Refactor.
Refactor
Encorrect max/min macros.
Encorrect max/min macros.