added #ifdef around headers and some debug message copying/terminating to support...