cleanup, tests, documentation