Refactoring progress to reduce length of method.