various fixes and enhancements, see git log.