Refactoring the test module