Refine scripts.