Bug fixes and small enhancements.