Additional tests and a bit of cleaning