Re write all scripts