Improve testing script