Code cleanup, typo fixes.