Complete acceptence tests, resolving bugs along the way

Like it says on the tin, this fills in some of the acceptance tests and, happily, fixes some of the bugs these tests unearth.

Yay!

Probably needs PR #110 merging (or deleting) first.