optimize some tests

This speeds up some tests