upgrade retooling, minor cleanup