A few typo fixes and better implementation of encounter groups. Fixes #1.