Update

Fixes #15 and #16, and also some cosmetic things.