Re-write parts of script (2)