* add more tests.
* clean up code.