Added better support for teams; fixed getAttributes()