More refactoring for easier readability.