Fix tests.
Add more tests.