added possibility to compile with or without debug
corrected main definition to ANSI