Improve test coverage

Currently we're only at 82% coverage. Ideally this should be 95%.