Cleanup.
Added more tests.