Add more tests and fix stuff.