Coherent code spruced up to work in the followup pipeline. Absorbs fixes in PR3568, PR3569, and PR3570.