Improved the test scripts