Refactor : move defines to beginning

    * Fixes multiple macro definitions during build
Fix test break