Added ability to compile with debug mode.