Tests

Inspired by our lack of coverage, here are a bunch more tests. They already wrangled up a couple bugs, so that was an added bonus.