Typo fixes and code cleanup.