Updated update and upgrade scripts