More tests and a little bit of debugging