made debug output more verbose.
whitespace fix and removed warnings.