Refactor PR #114