First 3 commits are straightforward cherry picks, the last one took a bit more effort due to changes to the code on master.