Misc cleanups.

Some tests.