Fixes for several bugzilla tickets and other observed issues.