Refactor Team class to entities