The ex ante optimal contract between investors and employees is derived endogenously and is interpreted in terms of debt, equity, and employees' compensation. Although public equity financing is feasible in this model through verified accounting income, debt is needed to force value-enhancing restructuring before the income realizes. The optimal debt level, however, is lower than that which maximizes the value of the firm when there is nonmonetary restructuring-related cost to employees. The paper explains how stock prices react to exchange offers, how earnings can be diluted by a decrease in leverage, and why employees' claims are generally senior to those of investors. New testable implications about leverage and compensation levels are derived.