Refactored parts of the test suite