Refine Cloak-Uncloak script.