ENG-7195: refactor.
Merge remote-tracking branch 'upstream/ENG-7195' into ENG-7195