Bugfixes, and console output cleanup.