Added a UI and fixed up the tests.