Moved a lot of featurization details from custom_defines.h into their respective header files