bugfixes, upgrades, cleanups