Add tests and fix previous tests.