Added a debug option for (so far) logging, and cleared some useless debug outputs.

The "DEBUG" flag will be set to false for distribuition