Turn upgrade scripts into modules