tests, cleanup, docs