Refactor proposed changes from PR #3896
3 files changed