Refatored and removed some tests