Incorporated feedback from @ncoghlan.