Unit tests

I moved some of the loose tests in the root of the tree into more standardized places; there's some precedent for this on a few of the feature branches. I thought I would formalize this (and document it).

Some of the model tests are actually failing, but I'm disinclined to fix these while the big refactoring/redesign effort on the newapi branch is ongoing.