Refactoring to make more readable.