Simplify EQ macros' implementation