Improved test script.