Compatibility fixes : Ensure headers are parsed only once, ensure headers contain all required includes, move for-loop variable declarations out of for-loop, add break to end of switch, cast printf arguments
Debug: Enable define to switch in many more debugging prints