Enhancements and bugfixes