No need to undef inside a cpp.
Move some defines, and turn others into enums.