Fix some tests
Lots of changes...