remove unneeded debug output
make most debug output conditional