Change scripts to use less-archaic and nicer methods