Corporate scholars rely on traditional theories of the firm to analyze corporate organization and corporate contracting.  Traditional theories of the firm, however, have long neglected the role of knowledge in shaping the internal structure of firms.  Current analyses of firm structure that rely on these theories therefore suffer from serious shortcomings.  This paper begins to address this gap by analyzing knowledge resources and investigating their influence on internal corporate governance structures.  We propose a new typology that explains firm internal governance structure based on the types of knowledge used in the production process.  We analyze the interaction of law and knowledge management.  We investigate how firms can bind knowledge by means of patents, trade secrets and private contracting, such as covenants not to compete.  We propose a principle of efficient knowledge allocation, which holds that organizational structures result from the necessity to maximize the use of knowledge resources.  We discuss specific hazards that emerge from transactions with knowledge inputs.  We discuss particular applications of the typology.   We show how the management of knowledge resources required in mass production, high tech and law firms differentially affects the decisional hierarchies of these firms and also their compensation structure in certain instances.  We argue that knowledge resources drove the change in the organizational structure of mass production firms from the U-form to the M-form, affecting decision making rights.  We show how the adoption of stock options plans in high tech firms aims at constraining knowledge hazards.  Stock options prevent leakage by retaining individual knowledge and discouraging hoarding of knowledge.  We argue that the model of profit splitting and the hierarchy between partners and associates in law firms are also explained by the necessity of maximizing the use of knowledge resources.  We then examine how the change of knowledge types used in law firms is affecting their organization.  Finally, we investigate how certain business transactions like mergers, joint ventures and licensing contracts are shaped by knowledge inputs.  We show that knowledge considerations provide a positive explanation for firm structure and a normative view in that the principle of efficient knowledge allocation should be an important concern of policy makers concerned with corporate reform