REDTEST-0027: code refactoring.