Rewrite part of script.