Refactor based on HH code review. WEB-8033