Fix choice encoding

Fixes bug #15 - choice encoding had no tests and was broken
Add spaces after `{`, `:`, and before `}`.