Merge last month of upstream changes

This is a pretty big set of changes. We may find ourselves wanting to walk some of this back but I propose we merge now to avoid straying from upstream further.