minor cleanups, typo and whitespace fixes