minor cleanup of do_tests