cleaning up the examples, need to copy a few into unittests.