API .close removed, .flush added, and test script update.