Add new config files for tests.
Add tests; fix bugs.