post-unittesting fixes
Added basic unit tests.
okay, these aren't really unit tests at all. they're round-trip API tests, by unit. mocks to come.