Refactoring teams pages