Add test directory to git ignore.
Add code coverage to tests. Add a bunch more tests to bump the coverage.
Miscellaneous fiddling around and refactoring.