Bug fixes and feature enhancements