Fix tests merge all

Merge outstanding changes in preparation for retirement. Also fix tests (except for ESRI, which remains broken for now).