Exhibit 2.7 FIRST AMENDMENT TO STOCK PURCHASE AGREEMENT This FIRST AMENDMENT TO STOCK PURCHASE AGREEMENT (this "Amendment") is made as of May 17, 1999, among Atrium Companies, Inc., a Delaware corporation ("BUYER"), and David Rascoe, Todd Rascoe, Brian Warren, Gary Petitclerc and Evan Kaffenes (collectively, the "ROLLING OPTIONHOLDERS"). RECITALS WHEREAS, Heat, Inc. ("HEAT"), its Shareholders and Optionholders (including the Rolling Optionholders), H.I.G. Vinyl, Inc., a Cayman Island corporation, H.I.G. Investment Fund, L.P., a Cayman Island limited partnership, H.I.G. Capital Management, Inc., a Delaware corporation and Buyer, have entered into that certain Stock Purchase Agreement, dated April 20, 1999 (the "STOCK PURCHASE AGREEMENT"), pursuant to which Buyer will acquire all of the issued and outstanding capital stock and options of Heat and H.I.G. Vinyl, Inc., a Delaware corporation, which includes the options (the "Heat Options") to acquire shares of Heat's Class A Common Stock, par value $.01 per share (the "HEAT COMMON STOCK"), held by the Rolling Optionholders. WHEREAS, Section 11.05 and Section 13.10 of the Stock Purchase Agreement contemplate that the Stock Purchase Agreement may be amended solely by the parties hereto to provide that some or all of the Heat Options held by the Rolling Optionholders may be exchanged for options (the "D&W OPTIONS") to purchase common stock, par value $0.01 per share, of D and W Holdings, Inc., a Delaware corporation and the ultimate parent company of Buyer ("D&W"), rather than cash. WHEREAS, the parties hereto have determined that it is in their best interests to amend the Stock Purchase Agreement. NOW, THEREFORE, in consideration of the mutual promises, agreements and covenants set forth herein and in the Stock Purchase Agreement and other good and valuable consideration, the receipt and sufficiency of which are hereby acknowledged, the parties hereto, intending legally to be bound, agree as follows: 1. DEFINED TERMS. Capitalized terms used and not defined herein shall have the respective meanings ascribed to them in the Stock Purchase Agreement. 2. AMENDMENT AND ACKNOWLEDGMENT TO STOCK PURCHASE AGREEMENT. (a) The first sentence of Section 1.01 of the Stock Purchase Agreement shall be deleted in its entirety and replaced with the following: THE AGGREGATE CONSIDERATION TO BE DELIVERED BY BUYER SHALL BE (I) AN AMOUNT IN CASH EQUAL TO (A) THE AGGREGATE EQUITY PRICE MINUS (B) THE AGGREGATE ROLLED AMOUNT, AND (II) SECURITIES TO BE DELIVERED TO ROLLING OPTIONHOLDERS, REPRESENTING THE AGGREGATE ROLLED AMOUNT. (b) Section 1.04(a) shall be deleted in its entirety and replaced with the following: THE PURCHASE PRICE FOR EACH OF THE ISSUED AND OUTSTANDING OPTIONS FROM THE OPTIONHOLDERS SHALL BE AN AMOUNT, IN CASH OR, IN THE CASE OF ROLLING OPTIONHOLDERS, SECURITIES, EQUAL TO THE PER SHARE PURCHASE PRICE MINUS THE EXERCISE PRICE FOR SUCH OPTION (THE "PER OPTION PURCHASE PRICE"). (c) Section 1.07(b)(i) shall be deleted in its entirety and replaced with the following: BUYER SHALL (A) DELIVER TO THE SHAREHOLDER REPRESENTATIVE (ON BEHALF OF THE SHAREHOLDERS (OTHER THAN VINYL), THE OPTIONHOLDERS (OTHER THAN THE ROLLING OPTIONHOLDERS IN RESPECT OF ANY ROLLED AMOUNTS) AND H.I.G. CAYMAN) AN AMOUNT IN CASH EQUAL TO THE ESTIMATED AGGREGATE EQUITY PRICE DETERMINED PURSUANT TO SECTION 1.06(A), MINUS THE DEPOSIT AND THE DEPOSIT INTEREST, BY WIRE TRANSFER OF IMMEDIATELY AVAILABLE FUNDS TO THE ACCOUNT DESIGNATED BY THE SHAREHOLDER REPRESENTATIVE TO BUYER PRIOR TO THE CLOSING, AND (B) DELIVER TO THE ROLLING OPTIONHOLDERS SECURITIES REPRESENTING THEIR RELEVANT ROLLED AMOUNTS, AS DESCRIBED IN SECTION 2(E) OF AMENDMENT NO. 1. (d) Section 5.08 shall be deleted in its entirety and replaced with the following: TO THE EXTENT BUYER HAS OBTAINED THE DEBT FINANCING DESCRIBED IN THE FINANCING LETTER, BUYER HAS, AND SHALL HAVE AT THE CLOSING, SUFFICIENT CASH AND AVAILABLE CREDIT FACILITIES (AND HAS PROVIDED EVIDENCE THEREOF SATISFACTORY TO THE SHAREHOLDER REPRESENTATIVE), TO PAY THE FULL CONSIDERATION PAYABLE TO THE SHAREHOLDERS (OTHER THAN VINYL), THE OPTIONHOLDERS AND H.I.G. CAYMAN HEREUNDER, TO MAKE ALL OTHER NECESSARY PAYMENTS BY IT IN CONNECTION WITH THE PURCHASE OF THE SHARES, THE VINYL SHARES AND THE OPTIONS AND TO PAY ALL OF ITS 2 RELATED FEES AND EXPENSES; PROVIDED HOWEVER, THAT, IN DETERMINING SUCH SUFFICIENCY, THE AGGREGATE ROLLED AMOUNT SHALL BE EXCLUDED FROM THE CALCULATION OF CONSIDERATION PAYABLE, SO LONG AS SUCH AGGREGATE ROLLED AMOUNT IS PAID FOR WITH THE ISSUANCE OF SECURITIES. (e) Each Rolling Optionholder acknowledges and agrees that, notwithstanding the provisions of Section 1.04 of the Stock Purchase Agreement: (i) such Rolling Optionholder will not be eligible to receive a portion of the Aggregate Equity Price in cash from Buyer in the manner set forth in Section 1.04 of the Stock Purchase Agreement in exchange for the Options set forth beside such Rolling Optionholder's name on EXHIBIT A hereto (the "Rolled Options"); and (ii) to the extent that such Rolling Optionholder is not eligible to receive a portion of the Aggregate Equity Price in cash from Buyer as contemplated by Section 1(b)(i) of this Amendment, such Rolling Optionholder shall receive D&W Options, as set forth in, and subject to the terms and conditions of, the D and W Holdings, Inc. Replacement Stock Option Plan and the Replacement Stock Option Agreement to be entered into by and between D&W and such Rolling Optionholder. 3. DEFINITIONS. Section 12.01 of the Stock Purchase Agreement shall be amended by inserting the following new defined terms in the appropriate alphabetical order: "AGGREGATE EQUITY PRICE" shall be an amount equal to (a) $85,000,000 PLUS (b) the aggregate amount of cash and cash equivalents held by the Company as of the Closing Date (the "CLOSING CASH") MINUS (c) the outstanding amount of the Indebtedness as of the Closing to be paid by Buyer pursuant to Section 1.07(b)(v) (the "CLOSING DEBT") MINUS (d) the Escrow Amount MINUS (e) $32,500, which represents the cash amount of the Special Bonus Awards granted pursuant to the letters dated February 12, 1999 to Thomas Warren, Michael Lane and Gerald Fiano (collectively, the "Bonuses") MINUS (f) the outstanding amount of capitalized lease obligations as of the Closing Date (the "CAPITALIZED LEASE OBLIGATIONS") MINUS (g) any outstanding amounts owed in connection with any agreements with Computer Associates International, Inc., to the extent such obligations are not paid in full, as of the Closing Date (the "OUTSTANDING COMPUTER ASSOCIATES DEBT"). "AGGREGATE ROLLED AMOUNT" means the aggregate Rolled Amounts of all Rolling Optionholders. 3 "AMENDMENT NO.1" means the First Amendment to Stock Purchase Agreement, dated as of May 17, 1999, by and among Buyer and the individuals set forth therein. "ROLLED AMOUNT" means, with respect to each Rolling Optionholder, the amount equal to the product obtained when the number of shares of Heat Class A Stock issuable upon the exercise of Rolled Options immediately prior to the Closing Date, whether at or upon the passage of time or the occurrence of future events, is multiplied by an amount equal to the Per Option Purchase Price of such Rolled Option. "ROLLING OPTIONHOLDER" has the meaning set forth in the preamble of Amendment No. 1. 4. FURTHER ASSURANCES. From time to time, as and when requested by any party hereto and at such party's expense, either before or after the Closing, any other party shall execute and deliver, or cause to be executed and delivered, all such documents and instruments and shall take, or cause to be taken, all such further or other actions as such other party may reasonably deem necessary or desirable to evidence and effectuate the transactions contemplated by this Amendment. 5. AMENDMENT AND WAIVER. Any provision of this Amendment or the Exhibits hereto may be amended or waived only in writing signed by Buyer and the other parties hereto; provided, that if any amendment or waiver adversely affects any party hereto in any material respect that does not affect all other parties hereto, such amendment or waiver shall require the consent of the first party. No waiver of any provision hereunder or any breach or default thereof shall extend to or affect in any way any other provision or prior or subsequent breach or default. The Stock Purchase Agreement, as amended hereby, is hereby ratified and confirmed in all respects and shall continue in full force and effect. 6. SEVERABILITY. Whenever possible, each provision of this Amendment shall be interpreted in such manner as to be effective and valid under present or future applicable law, but if any provision of this Amendment is held to be prohibited by or invalid under applicable law, such provision shall be ineffective only to the extent of such prohibition or invalidity, without invalidating the remainder of such provision or the remaining provisions of this Amendment. 7. COUNTERPARTS. This Amendment may be executed in multiple counterparts, any one of which need not contain the signatures of more than one party, but all such counterparts taken together shall constitute one and the same instrument. 4 8. COMPLETE AGREEMENT. This Amendment, the Stock Purchase Agreement, and the documents referred to therein (including the Confidentiality Agreement) contain the complete agreement between the parties hereto and merge and supersede any prior understandings, agreements or representations by or between the parties, written or oral, which may have related to the subject matter hereof in any way, including, without limitation, the Letter of Intent, dated March 1, 1999. 9. GOVERNING LAW. This Amendment and all matters relating to the interpretation, construction, validity and enforcement of this Amendment shall be governed by and construed in accordance with the domestic laws of the State of New York without giving effect to any choice or conflict of law provision or rule (whether of the State of New York or any other jurisdiction) that would cause the application of laws of any jurisdiction other than the State of New York. The parties hereto agree to submit to the personal and exclusive jurisdiction of the state and federal courts serving Pittsburgh, Pennsylvania with respect to the enforcement or interpretation of this Amendment or the parties' obligations hereunder. Each party hereto irrevocably consents to the service of any and all process in any action or proceeding by the mailing of copies of such process by registered or certified mail to such party hereto to serve legal process in any other manner permitted by law. Each party hereto irrevocably waives, to the full extent permitted by law, any objection which it may now or hereafter have to the laying of the venue of any such proceeding brought in such a court and any claim that any such proceeding brought in such a court has been brought in an inconvenient forum. 10. ASSIGNMENT. This Amendment and all of the provisions hereof shall be binding upon and inure to the benefit of the parties hereto and their respective successors and permitted assigns, except that neither this Amendment nor any of the rights, interests or obligations hereunder may be assigned or delegated by either party without the prior written consent of all other parties. Notwithstanding the foregoing, (a) Buyer may assign or delegate any or all of its rights or obligations under this Amendment to any Affiliate of Buyer, and (b) nothing in this Agreement shall limit Buyer's ability to make a collateral assignment of its rights under this Amendment to any institutional lender that provides funds to Buyer, without the consent of the other parties hereto; provided, however, that unless written notice is given to the other parties hereto, that any such collateral assignment has been foreclosed upon, such other parties shall be entitled to deal exclusively with Buyer as to any matters arising under this Amendment or the transactions contemplated by this Amendment. In the event of such an assignment, the provisions of this Amendment shall insure to the benefit of, and be binding upon, the assigns of Buyer. 11. NO STRICT CONSTRUCTION. The language used in this Amendment shall be deemed to be the language chosen by the parties hereto to express their mutual intent, and no rule of strict construction shall be applied against any Person. The section headings 5 herein have been inserted for convenience of reference only and shall in no way modify or restrict the terms and provisions hereof. 12. EXHIBITS. All Exhibits referred to in this Amendment are intended to be and are hereby specifically made a part of this Amendment. 6 IN WITNESS WHEREOF, the parties hereto have executed and delivered this Amendment as of the date and year first above written. ATRIUM COMPANIES, INC. By: /s/ JEFF L. HULL ----------------------------------- Name: Jeff L. Hull Title: Executive Vice President Chief Financial Officer Treasurer and Secretary ROLLING OPTIONHOLDERS: /s/ DAVID RASCOE --------------------------------------- David Rascoe /s/ TODD RASCOE --------------------------------------- Todd Rascoe /s/ BRIAN WARREN --------------------------------------- Brian Warren /s/ GARY PETITCLERC --------------------------------------- Gary Petitclerc /S/ EVAN KAFFENES --------------------------------------- Evan Kaffenes EXHIBIT A Rolled Replacement Name Heat Options D&W Options ---- ------------ ----------- DAVID RASCOE 8,062 319,149 TODD RASCOE 4,031 159,574 BRIAN WARREN 2,567 63,830 GARY PETITCLERC 1,612 79,787 EVAN KAFFENES 4,459*/ 53,191 - ---------- */ With an exercise price of $30.00