Improve tests2

Some progress on #4334,
I'll try to work a bit more on this, but it takes quite some time :p 
please review :)