Moved all necessary defines into header files.