Minor refactoring to show how methods can be made smaller