More tidying up to make the delta smaller between my changes and upstream