Script refining