assorted fixes and enhancements