Refactoring regression test script.