Improved teams.lua