Improved the test script.