Wrote a bunch more persistence layer unit tests.

88% code coverage now. Whoop.