Some macros for auto-generating nice code.