ENG-6472, changes based on code review.