Refactoring test modules