In 1976, Black and Cox proposed a structural model in which an obligor defaults when the value of its assets hits a certain barrier. In 2001, Zhou showed that the model can be extended to two obligors whose assets are correlated. In this paper we show that the model can be extended to a large number of different obligors. The correlations between the assets of the obligors are determined by one or more factors. We examine the dynamics of credit spreads implied by the model and explore how the model prices tranches of collateralized debt obligations (CDOs). We compare the model with the widely used Gaussian copula model of survival time and test how well the model fits market data on the prices of CDO tranches. We consider three extensions of the model. The first reflects empirical research showing that default correlations are positively dependent on default rates. The second reflects empirical research showing that recovery rates are negatively dependent on default rates. The third reflects research showing that market prices are consistent with heavy tails for both the common factor and the idiosyncratic factor in a copula model.