Fix embarrassing typo, and other improvements