Debug messages now on stdout instead of stderr, and some cosmetics regarding debug messages