Add tests.
First version. Works.
Still a lot of things to test.