Little improvements in tests and code.