More refactorings
Refactored the tests