Refactoring all MAX, MIN, ABS calls to general/mathmacros. Adding a GCC optimisation for these macros.