Begin refactoring for readability.