improve -debug output and comments a little.