Address a number of issues raied with the pull request.