More refactoring to increase readability.