Trait for tests
Porting some tests
Test improvements