Tests are fixed.
Some improvements.