Optimizing Teamwork for Small Groups