Moved some constants and macros from headers into source files because they are private to the modules.