Refined script.