Refactoring into useful methods.