Slight refactoring.