Small fixes.
More unittests.