Minor enhancements and bug fixes