More tests rewritten