(Some minor typo fixes and an extra assertion... no behavior has changed.)