(#13) - use switch statements, fix zero usage

Some small fixes here:

* use `switch` instead of `if`.  It's faster on Safari, and uses less code.
* we weren't consistent in adding the `zero` at the end.  Couldn't find a test case that would fail before, but in any case our usage is consistent now.

All the tests pass, and the mapreduce tests pass as well.