Cleaned up the code. Now we build more tests.