Rewrite the scripts