Improved the testexamples script