Rewrote the some tests to improve isolation