Cleaning up some tests.
Modified example to use new API.