Bit of refactoring for team functionality. Next: need a way to add teams!