Wrote a bunch of tests, fixed a bunch of other tests.