Small fixes + more tests.