Added Team class and fixed some errors