Moved a bunch of definitions out of module.h into a new