Various changes and corrections for the pull request