Minor server-side bug fixes. Added a few basic tests.