Numerous changes to scripts