Cleanup of the TeamsForYear function, sorting and documenting.