More cleanup, examples and tests.