cleaning up some more repeated instructions with macros, with focus on the comparison instructions, which are scheduled for further cleanup.
something messed up the indenting, but now we're passing functions as they should be