Resolved #32: unit tests

Achieved 60% coverage overall; repositories are hard to test because of
JDBC.