Improve write test specs, tidy code.
Use enum.
Assert on multiple additions.
Assert on write encode errors.

Restores 100% code coverage.
0.3.0