Enhancements and bug fixes