Refactoring test files