Merge V4 work

Just V4, accidentally merged into my next_release fork first. Fortunately it all appears to be in order, and there are no unexpected commits below.