Small refactoring to make code a little more readable.