Unit tests catch up.
Fixes #4.
Fixes #11.