Remove unnecessary code from scripts.