Few tests and small improvements