More code and support for integration test.
Cleanup.