Fixes per Gareth's comments on the pull request.