Looks good. I would perhaps not add the extra {}'s around the single-line if
clauses as it slightly obfuscates the diff (style(9) actually suggests no
{}'s in that case, but I think in practice our sources have a mixture of
both).