Split up defines and flags
Removed debugging output that made it impossible to compile debugmode