Minor refactoring as part of REVIEW-5050