More refactoring into helper methods.