ENG-7343: review changes and refactor.