UP-3679:  Merging pull request #116, plus a couple modest tweaks