Bug fixes and enhancements.

Various bug fixes and enhancements.