various small enhancements and bugfixes