Managing queues and teams