Typo kill and minor refactoring.