bugfixes, performance enhancements, and command-line output tweaks