Rewrite team menu code
Fix minor class menu bug