Fixes from test results, better docs.
More tests.