Cleaned up tests and fixed issue #2.