debug output and some other small things
debug output and some other small things