-Adding some debug-file output
-Minor cleaning