Various changes following upstream pull request #3 comments.