Minor refactoring.
Further refactoring.