Sync with upstream

Assorted small stuff, all non-functional change. See single log messages for details.