More cleanup and more tests. :)