Miscellaneous fixes and enhancements