EXECUTION COPY AMENDMENT NO. 3 TO THE CREDIT AGREEMENT Dated as of May 19, 2005 AMENDMENT NO. 3 TO THE CREDIT AGREEMENT (this "Amendment No. 3") among Headwaters Incorporated, a Delaware corporation, (the "Borrower"), the Lenders (as hereinafter defined) party hereto, Morgan Stanley & Co. Incorporated ("MS&Co."), as collateral agent (the "Collateral Agent"), and Morgan Stanley Senior Funding, Inc. ("Morgan Stanley"), as administrative agent (the "Administrative Agent"; together with the Collateral Agent, the "Agents"). PRELIMINARY STATEMENTS: (1) The Borrower, certain financial institutions and other persons from time to time parties thereto (collectively, the "Lenders"), the Agents, JPMorgan Chase Bank, N.A. ("JPMCB") (as successor to JPMorgan Chase Bank), as syndication agent, and Morgan Stanley and J.P. Morgan Securities Inc., as joint lead arrangers and joint bookrunners, have entered into that certain Credit Agreement dated as of September 8, 2004 (as amended, restated, supplemented or otherwise modified, the "Credit Agreement"; capitalized terms used herein but not defined shall be used herein as defined in the Credit Agreement). (2) The Borrower, the Agents and the Required Lenders have agreed, subject to the terms and conditions hereinafter set forth, to amend the Credit Agreement in certain respects as set forth below. NOW, THEREFORE, in consideration of the premises and for other good and valuable consideration (the receipt and sufficiency of which is hereby acknowledged), the parties hereto hereby agree as follows: SECTION 1. Amendment of Credit Agreement. The Credit Agreement is, effective as of the date hereof and subject to the satisfaction of the conditions precedent set forth in Section 2 of this Amendment No. 3, hereby amended as follows: (a) Section 6.10(iv) of the Credit Agreement is hereby amended and restated in its entirety to read as follows: "(iv) so long as no Default or unmatured Default exists at the time thereof or would arise after giving effect thereto, (A) at any time after September 8, 2005 the Borrower may prepay the Second Lien Financing with cash on hand, including cash proceeds from any litigation settlements and (B) the Borrower may apply an aggregate amount of up to $50,000,000 in cash proceeds from any litigation settlements to prepayment of the Second Lien Financing, in each case with respect to this clause (iv), including any prepayment premium and additional amounts or costs payable in connection with such prepayment." SECTION 2. Conditions to Effectiveness. This Amendment No. 3 and the amendments contained herein shall become effective as of the date hereof (the NYDOCS03/768241.1 Headwaters - First Lien Amendment No. 3 2 "Amendment No. 3 Effective Date") when each of the conditions set forth in this Section 2 to this Amendment No. 3 shall have been fulfilled to the satisfaction of the Administrative Agent. (i) Execution of Counterparts. The Administrative Agent shall have received counterparts of this Amendment No. 3, duly executed and delivered on behalf of each of the Borrower and the Required Lenders, or, as to any of the foregoing parties, advice reasonably satisfactory to the Administrative Agent that such party has executed a counterpart of this Amendment No. 3. (ii) Guarantor Consent. The Administrative Agent shall have received the Consent attached hereto duly executed by each of the Guarantors. (iii) Payment of Fees and Expenses. The Borrower shall have paid all reasonable expenses (including the reasonable fees and expenses of Shearman & Sterling LLP) incurred in connection with the preparation, negotiation and execution of this Amendment No. 3 and other matters relating to the Credit Agreement from and after the last invoice to the extent invoiced. (iv) No Default. No Default or Unmatured Default shall have occurred and be continuing, or would occur as a result of the transactions contemplated by this Agreement. SECTION 3. Confirmation of Representations and Warranties. Each of the Credit Parties hereby represents and warrants, on and as of the date hereof, that the representations and warranties contained in the Credit Agreement are correct and true in all material respects on and as of the date hereof, before and after giving effect to this Amendment No. 3, as though made on and as of the date hereof, other than any such representations or warranties that, by their terms, refer to a specific date. SECTION 4. Reference to and Effect on the Loan Documents. (a) On and after the effectiveness of this Amendment No. 3, each reference in the Credit Agreement to "hereunder", "hereof" or words of like import referring to the Credit Agreement, and each reference in the other transaction documents to the "Credit Agreement", "thereunder", "thereof" or words of like import referring to the Credit Agreement, shall mean and be a reference to the Credit Agreement as modified by this Amendment No. 3. (b) The Credit Agreement, the Pledge and Security Agreement, the Notes and each of the other Loan Documents, as specifically amended by this Amendment No. 3, are and shall continue to be in full force and effect and are hereby in all respects ratified and confirmed. Without limiting the generality of the foregoing, the Collateral Documents and all of the Collateral described therein do and shall continue to secure the payment of all Obligations of the Credit Parties under the Loan Documents, in each case as amended by this Amendment No. 3. (c) The execution, delivery and effectiveness of this Amendment No. 3 shall not, except as expressly provided herein, operate as a waiver of any right, power or remedy of any Lender or any Agent under any of the Loan Documents, nor constitute a waiver of any provision of any of the Loan Documents. NYDOCS03/768241.1 Headwaters - First Lien Amendment No. 3 3 SECTION 5. Execution in Counterparts. This Amendment No. 3 may be executed in any number of counterparts and by different parties hereto in separate counterparts, each of which when so executed shall be deemed to be an original and all of which taken together shall constitute but one and the same agreement. Delivery of an executed counterpart of a signature page to this Amendment No. 3 by facsimile shall be effective as delivery of a manually executed original counterpart of this Amendment No. 3. SECTION 6. Governing Law. This Amendment No. 3 shall be governed by, and construed in accordance with, the laws of the State of New York, and shall be subject to the jurisdictional and service provisions of the Credit Agreement, as if this were a part of the Credit Agreement. SECTION 7. Entire Agreement; Modification. This Amendment No. 3 constitutes the entire agreement of the parties hereto with respect to the subject matter hereof, there being no other agreements or understandings, oral, written or otherwise, respecting such subject matter, any such agreement or understanding being superseded hereby, shall be binding upon and inure to the benefit of the parties hereto and their respective successors and assigns, and may not be amended, extended or otherwise modified, except in a writing executed in whole or in counterparts by each party hereto. [Signatures follow.] NYDOCS03/768241.1 Headwaters - First Lien Amendment No. 3 IN WITNESS WHEREOF, the parties hereto have caused this Agreement to be executed by their respective officers thereunto duly authorized, as of the date first above written. HEADWATERS INCORPORATED By /s/ Steven G. Stewart ---------------------------------- Title: Chief Financial Officer MORGAN STANLEY SENIOR FUNDING, INC., as Administrative Agent and as a Lender By /s/ Todd Vannucci ---------------------------------- Title: Executive Director MORGAN STANLEY & CO. INCORPORATED, as Collateral Agent By /s/ Todd Vannucci ---------------------------------- Title: Executive Director [And Other Lenders] NYDOCS03/768241.1 Headwaters - First Lien Amendment No. 3 CONSENT Dated as of May 19, 2005 Reference is made to the Credit Agreement referred to in the foregoing Amendment No. 3 (capitalized terms used herein and not defined being used herein as defined in the Credit Agreement). Each of the undersigned, in its capacity as a Guarantor under the Guaranty Agreement and as a Grantor under the Pledge and Security Agreement, hereby (i) consents to the execution, delivery and performance of Amendment No. 3 and agrees that each of the Guaranty Agreement and the Pledge and Security Agreement is, and shall continue to be, in full force and effect and is hereby in all respects ratified and confirmed on the Amendment No. 3 Effective Date, except that, on and after the Amendment No. 3 Effective Date, each reference to "the Credit Agreement", "thereunder", "thereof", "therein" or words of like import referring to the Credit Agreement shall mean and be a reference to the Credit Agreement as amended and otherwise modified by Amendment No. 3 and (ii) confirms that the Collateral Documents to which each of the undersigned is a party and all of the Collateral described therein do, and shall continue to, secure the payment of all of the Secured Obligations. ACM BLOCK & BRICK GENERAL, INC., ACM BLOCK & BRICK PARTNER, LLC, ACM BLOCK & BRICK, LLC, ACM BLOCK & BRICK, LP, ACM FLEXCRETE, LP, ACM GEORGIA, INC., AMERICAN CONSTRUCTION MATERIALS, INC., BEST MASONRY & TOOL SUPPLY, INC., CHIHUAHUA STONE LLC, COVOL ENGINEERED FUELS, LC, COVOL SERVICES CORPORATION, DON'S BUILDING SUPPLY, L.P., EAGLE STONE & BRICK LLC, ELDORADO ACQUISITION, LLC, ELDORADO G-ACQUISITION CO., ELDORADO SC-ACQUISITION CO., ELDORADO STONE ACQUISITION CO., LLC, ELDORADO STONE CORPORATION, ELDORADO STONE FUNDING CO., LLC, ELDORADO STONE LLC, ELDORADO STONE OPERATIONS LLC, NYDOCS03/768241.1 Headwaters - First Lien Amendment No. 3 GLOBAL CLIMATE RESERVE CORPORATION, each as a Guarantor By /s/ Steven G. Stewart -------------------------------- Name: Steven G. Stewart Title: Chief Financial Officer NYDOCS03/768241.1 Headwaters - First Lien Amendment No. 3 HEADWATERS CLEAN COAL CORP., HEADWATERS HEAVY OIL, INC., HEADWATERS NANOKINETIX, INC., HEADWATERS OLYSUB CORPORATION, HEADWATERS TECHNOLOGY INNOVATION GROUP, INC., HTI CHEMICAL SUBSIDIARY, INC. HYDROCARBON TECHNOLOGIES, INC., ISG MANUFACTURED PRODUCTS, INC., ISG PARTNER, INC., ISG RESOURCES, INC., ISG SERVICES CORPORATION, ISG SWIFT CRETE, INC., L&S STONE LLC, L-B STONE LLC, LEWIS W. OSBORNE, INC., MAGNA WALL, INC., NORTHWEST PROPERTIES LLC, NORTHWEST STONE & BRICK CO., INC., NORTHWEST STONE & BRICK LLC, PALESTINE CONCRETE TILE COMPANY, L.P., STONECRAFT INDUSTRIES LLC, TEMPE STONE LLC, UNITED TERRAZZO SUPPLY CO., INC., VFL TECHNOLOGY CORPORATION, each as a Guarantor By /s/ Steven G. Stewart -------------------------------- Name: Steven G. Stewart Title: Chief Financial Officer ELDORADO FUNDING CO., as a Guarantor By /s/ Steven G. Stewart --------------------------------- Name: Steven G. Stewart Title: President NYDOCS03/768241.1 Headwaters - First Lien Amendment No. 3 TAPCO HOLDINGS, INC., TAPCO INTERNATIONAL CORPORATION, VANTAGE BUILDING PRODUCTS CORPORATION, MTP, INC., ATLANTIC SHUTTER SYSTEMS, INC., METAMORA PRODUCTS CORPORATION, METAMORA PRODUCTS CORPORATION OF ELKLAND, WAMCO CORPORATION, BUILDERS EDGE, INC., COMACO, INC., each as a Guarantor By /s/ Steven G. Stewart ---------------------------------- Name: Steven G. Stewart Title: Vice President, Finance NYDOCS03/768241.1 Headwaters - First Lien Amendment No. 3