Updated with team sort and arena resave code