Recitals

Contract

EXHIBIT 10.4 FOURTH AMENDMENT TO CREDIT AND SECURITY AGREEMENT This Amendment, dated as of September 24, 2003, is made by and between SOUTHERN FLOW COMPANIES, INC., a Delaware corporation (the "Borrower"), and WELLS FARGO BUSINESS CREDIT, INC., a Minnesota corporation (the "Lender"). RECITALS The Borrower and the Lender are parties to a Credit and Security Agreement dated as of September 24, 2001, as amended by (i) the First Amendment to Credit and Security Agreement dated as of November 19, 2002, (ii) the Second Amendment to Credit and Security Agreement and Waiver of Defaults dated as of March 26, 2003 and (iii) the Third Amendment to Credit and Security Agreement dated as of April 4, 2003 (as so amended, the "Credit Agreement"). Capitalized terms used in these recitals have the meanings given to them in the Credit Agreement unless otherwise specified. The Borrower has requested that certain amendments be made to the Credit Agreement, which the Lender is willing to make pursuant to the terms and conditions set forth herein. NOW, THEREFORE, in consideration of the premises and of the mutual covenants and agreements herein contained, it is agreed as follows: 1. Defined Terms. Capitalized terms used in this Amendment which are defined in the Credit Agreement shall have the same meanings as defined therein, unless otherwise defined herein. In addition, Section 1.1 of the Credit Agreement is amended by adding or amending, as the case may be, the following definitions: "Availability" means the lessor of (I) the difference of (i) the Borrowing Base and (ii) the outstanding principal balance of the Revolving Note and (II) the Maximum Line less the sum of (A) the outstanding principal balance of the Revolving Note, (B) the outstanding principal balance of the Metretek Revolving Note, (C) the Metretek L/C Amount, (D) the outstanding principal balance of the PowerSecure Revolving Note and (E) the PowerSecure L/C Amount. "Borrowing Base" means at any time the lesser of: (a) the Maximum Line; or (b) subject to change from time to time in the Lender's sole discretion, the sum of: (i) 85% of Eligible Accounts, (ii) the lesser of (A) 20% of Eligible Inventory or (B) $200,000, (iii) 65% of Unbilled Charts, (iv) 65% of Unbilled Fieldwork, plus (v) 65% of Unbilled Lab Work. "Maturity Date" means September 30, 2006. "Maximum Line" means $3,000,000 unless said amount is reduced pursuant to Section 2.9, in which event it means such lower amount. "Metretek Credit and Security Agreement" means the Credit and Security Agreement dated as of September 6, 2002, by and between Metretek, Incorporated, a Florida corporation and the Lender, as amended by a First Amendment to Credit and Security Agreement and Waiver of Defaults dated as of March 26, 2003 and by a Second Amendment to Credit and Security Agreement dated as of September 24, 2003, and as may be further amended from time to time. "Metretek L/C Amount" means the L/C Amount as defined in the Metretek Credit and Security Agreement. "Metretek Revolving Advances" means Revolving Advances as defined in the Metretek Credit and Security Agreement. "Metretek Revolving Note" means the Revolving Note as defined in the Metretek Credit and Security Agreement. "PowerSecure Credit and Security Agreement" means the Credit and Security Agreement dated as of September 24, 2003, by and between PowerSecure, Inc., a Delaware corporation and the Lender, as may be further amended from time to time. "PowerSecure L/C Amount" means the L/C Amount as defined in the PowerSecure Credit and Security Agreement. "PowerSecure Revolving Advances" means Revolving Advances as defined in the PowerSecure Credit and Security Agreement. "PowerSecure Revolving Note" means the Revolving Note as defined in the PowerSecure Credit and Security Agreement. "Southern Flow Guaranty" means the guaranty by the Borrower in favor of the Lender in connection with the Metretek Credit and Security Agreement. "Southern Flow Security Agreement" means the security agreement by and between the Borrower and the Lender in connection with the Metretek Credit and Security Agreement. 2 "Unbilled Charts" means the six month average of prior monthly chart billings, reported on a weekly basis to the Lender, representing charts that have been submitted to the Borrower for their review and integration of the measurements from each project, which would not otherwise be Eligible Accounts. "Unbilled Fieldwork" means the six month average of prior monthly fieldwork billings, reported on a weekly basis to the Lender, representing fieldwork that has been performed by the Borrower's representatives in various locations and submitted to the Borrower for processing, which would not otherwise be Eligible Accounts. "Unbilled Lab Work" means the six month average of prior monthly billings for lab work, reported on a weekly basis to the Lender, representing lab work that has been performed by the Borrower, which would not otherwise be Eligible Accounts. 2. Section 2.5(b). Section 2.5(b) of the Credit Agreement is amended and restated in its entirety to read as follows: "(b) MINIMUM INTEREST CHARGE. Notwithstanding the interest payable pursuant to Subsection (a), the Borrower shall pay to the Lender interest of not less than $37,500 per quarter (the "Minimum Interest Charge") during the term of this Agreement, and the Borrower shall pay any deficiency between (i) the Minimum Interest Charge and (ii) the sum of the amount of interest otherwise calculated under Section 2.5(a) of this Agreement, Section 2.8(a) of the Metretek Credit and Security Agreement and Section 2.8(a) of the PowerSecure Credit and Security Agreement; on the first day of each quarter and on the Termination Date. The Borrower will be given full credit on a dollar for dollar basis against the Minimum Interest Charge payable hereunder to the extent such amount is paid to the Lender pursuant to the Metretek Credit and Security Agreement or the PowerSecure Credit and Security Agreement." 3. Sections 2.6(c), 2.6(e) and 2.6(f). Sections 2.6(c), 2.6(e) and 2.6(f) of the Credit Agreement are amended and restated in their entirety to read as follows: "(c) TERMINATION AND LINE REDUCTION FEES. If the Credit Facility is terminated (i) by the Lender during a Default Period that begins before a Maturity Date, (ii) by the Borrower (A) as of a date other than a Maturity Date or (B) as of a Maturity Date but without the Lender having received written notice of such termination at least 90 days before such Maturity Date, or if the Borrower reduces the Maximum Line, the Borrower shall pay to the Lender a fee in an amount equal to a percentage of the Maximum Line (or the reduction of the Maximum Line, as the case may be) as follows: (A) two percent (2.0%) if the termination or reduction occurs on or before September 30, 2004; and (B) one percent (1.0%) if the termination or reduction occurs after September 30, 2004. The Borrower will be given full credit on a dollar for dollar basis against the fee payable hereunder to the extent such amount is paid to the Lender pursuant to the Metretek Credit and Security Agreement or the PowerSecure Credit and Security Agreement." "(e) UNUSED LINE FEE. For the purposes of this Section 2.6, "Unused Amount" means the Maximum Line reduced by (A) outstanding Revolving Advances, (B) 3 outstanding Metretek Revolving Advances, ( C) the Metretek L/C Amount, (D) outstanding PowerSecure Revolving Advances and (E) the PowerSecure L/C Amount. The Borrower agrees to pay to the Lender an unused line fee at the rate of one quarter of one percent (.25%) per annum on the average daily Unused Amount from the date of this Agreement to and including the Termination Date, due and payable monthly in arrears on the first day of the month and on the Termination Date. The Borrower will be given full credit on a dollar for dollar basis against the unused line fee payable hereunder to the extent such amount is paid to the Lender pursuant to the Metretek Credit and Security Agreement or the PowerSecure Credit and Security Agreement." "(f) FACILITY FEE. The Borrower agrees to pay to the Lender an annual facility fee at the rate of one half of one percent (.50%) of the Maximum Line, which facility fee shall be due and payable annually on September 1st. The Borrower will be given full credit on a dollar for dollar basis against the facility fee payable hereunder to the extent such amount is paid to the Lender pursuant to the Metretek Credit and Security Agreement or the PowerSecure Credit and Security Agreement." 4. Section 2.14. Section 2.14 of the Credit Agreement is amended and restated in its entirety to read as follows: "Section 2.14 "Reserved"." 5. Section 7.1. Section 7.1 of the Credit Agreement is amended by deleting the following phrase at the end thereof: "provided, however, that an Event of Default under Section 7.1(u) of the Credit and Security Agreement dated September 6, 2002 by and between Metretek, Incorporated and Wells Fargo Business Credit, Inc. shall not be considered an Event of Default hereunder." and inserting the following phrase in its place: "Provided, however, notwithstanding anything to the contrary herein or in the Southern Flow Guaranty or the Southern Flow Security Agreement, a default under Section 6.2(a) or Section 6.2(b) of the Metretek Credit and Security Agreement ( a "Metretek Default") shall not constitute an Event of Default under this Agreement, the Southern Flow Guaranty or the Southern Flow Security Agreement if within 20 days of the occurrence of the Metretek Default: (1) the Metretek Default is waived by the Lender in writing, or (2) each of the following conditions precedent have been satisfied, each in form and substance satisfactory to the Lender: A. The Metretek Revolving Note and the Metretek L/C Amount are paid in full, and all fees and expenses of the Lender payable under the Metretek Credit and Security Agreement are paid in full. 4 B. The Metretek Credit and Security Agreement is terminated by Metretek, Incorporated. C. The Term Note is paid in full. D. Neither the Borrower nor PowerSecure, Inc. are in default under this Agreement or the PowerSecure Credit and Security Agreement, or any guarantees by the Borrower or PowerSecure, Inc. in favor of the Lender or any security agreements by and between the Lender and the Borrower or PowerSecure, Inc. provided, further, however, that Metretek, Incorporated will remain as a Guarantor under this Agreement and under the PowerSecure Credit and Security Agreement." 6. Schedule 6.4. Schedule 6.4 of the Credit Agreement is amended by adding the following new guaranties at the end thereof: "Guaranty of the PowerSecure Credit and Security Agreement." "Guaranty of Metretek Technologies, Inc. Non-Negotiable Promissory Note to be issued in the amount of $3,000,000 to the Heins Settlement Fund." 7. Exhibit A. Exhibit A of the Credit Agreement is amended and restated in its entirety and replaced with Exhibit A attached hereto. 8. No Other Changes. Except as explicitly amended by this Amendment, all of the terms and conditions of the Credit Agreement shall remain in full force and effect and shall apply to any advance or letter of credit thereunder. 9. Restructure Fee. The Borrower shall pay the Lender as of the date hereof a fully earned, non-refundable restructure fee in the amount of $7,500 in consideration of the Lender's execution and delivery of this Amendment. The Borrower will be given full credit on a dollar for dollar basis against the restructure fee payable hereunder to the extent such amount is paid to the Lender pursuant to the Metretek Credit and Security Agreement or the PowerSecure Credit and Security Agreement. 10. Conditions Precedent. This Amendment shall be effective when the Lender shall have received an executed original hereof, together with each of the following, each in substance and form acceptable to the Lender in its sole discretion: (a) The Revolving Note, properly executed by the Borrower. (b) A guaranty, properly executed by Metretek Contract Manufacturing Company, Inc., pursuant to which Metretek Contract Manufacturing Company, Inc. unconditionally guarantees the full and prompt payment of all Obligations. 5 (c) A security agreement from Metretek Contract Manufacturing Company, Inc., pursuant to which Metretek Contract Manufacturing Company, Inc. grants a security interest on all of its assets to Lender as security for the Obligations. (d) The Acknowledgment and Agreement of Guarantors set forth at the end of this Amendment, duly executed by each Guarantor. (e) Payment of the fee described in Paragraph 9. (f) Such other matters as the Lender may require. 11. Representations and Warranties. The Borrower hereby represents and warrants to the Lender as follows: (a) The Borrower has all requisite power and authority to execute this Amendment and the Revolving Note and to perform all of its obligations thereunder, and this Amendment and the Revolving Note have been duly executed and delivered by the Borrower and constitute the legal, valid and binding obligations of the Borrower, enforceable in accordance with their terms. (b) The execution, delivery and performance by the Borrower of this Amendment and the Revolving Note has been duly authorized by all necessary corporate action and does not (i) require any authorization, consent or approval by any governmental department, commission, board, bureau, agency or instrumentality, domestic or foreign, (ii) violate any provision of any law, rule or regulation or of any order, writ, injunction or decree presently in effect, having applicability to the Borrower, or the articles of incorporation or by-laws of the Borrower, or (iii) result in a breach of or constitute a default under any indenture or loan or credit agreement or any other agreement, lease or instrument to which the Borrower is a party or by which it or its properties may be bound or affected. (c) All of the representations and warranties contained in Article V of the Credit Agreement are correct on and as of the date hereof as though made on and as of such date, except to the extent that such representations and warranties relate solely to an earlier date. 12. References. All references in the Credit Agreement to "this Agreement" shall be deemed to refer to the Credit Agreement as amended hereby; and any and all references in the Security Documents to the Credit Agreement shall be deemed to refer to the Credit Agreement as amended hereby. 13. No Other Waiver. The execution of this Amendment and any documents related hereto shall not be deemed to be a waiver of any Default or Event of Default under the Credit Agreement or breach, default or event of default under any Security Document or other document held by the Lender, whether or not known to the Lender and whether or not existing on the date of this Amendment. 6 14. Release. The Borrower and each Guarantor by signing the Acknowledgment and Agreement of Guarantors set forth below, each hereby absolutely and unconditionally releases and forever discharges the Lender, and any and all participants, parent corporations, subsidiary corporations, affiliated corporations, insurers, indemnitors, successors and assigns thereof, together with all of the present and former directors, officers, agents and employees of any of the foregoing, from any and all claims, demands or causes of action of any kind, nature or description, whether arising in law or equity or upon contract or tort or under any state or federal law or otherwise, which the Borrower or such Guarantor has had, now has or has made claim to have against any such person for or by reason of any act, omission, matter, cause or thing whatsoever arising from the beginning of time to and including the date of this Amendment, whether such claims, demands and causes of action are matured or unmatured or known or unknown. 15. Costs and Expenses. The Borrower hereby reaffirms its agreement under the Credit Agreement to pay or reimburse the Lender on demand for all costs and expenses incurred by the Lender in connection with the Loan Documents, including without limitation all reasonable fees and disbursements of legal counsel. Without limiting the generality of the foregoing, the Borrower specifically agrees to pay all fees and disbursements of counsel to the Lender for the services performed by such counsel in connection with the preparation of this Amendment and the documents and instruments incidental hereto. The Borrower hereby agrees that the Lender may, at any time or from time to time in its sole discretion and without further authorization by the Borrower, make a loan to the Borrower under the Credit Agreement, or apply the proceeds of any loan, for the purpose of paying any such fees, disbursements, costs and expenses and the fee required under Paragraph 9 hereof. 16. Miscellaneous. This Amendment and the Acknowledgment and Agreement of Guarantors may be executed in any number of counterparts, each of which when so executed and delivered shall be deemed an original and all of which counterparts, taken together, shall constitute one and the same instrument. IN WITNESS WHEREOF, the parties hereto have caused this Amendment to be duly executed as of the date first written above. WELLS FARGO BUSINESS CREDIT, INC. SOUTHERN FLOW COMPANIES, INC. By: /s/ Patti Scudder By: /s/ A. Bradley Gabbard ------------------------------ -------------------------------- Name: Patti Scudder Name: A. Bradley Gabbard Its: Commercial Banking Officer Its: Chief Financial Officer 7 EXHIBIT A TO CREDIT AND SECURITY AGREEMENT AMENDED AND RESTATED REVOLVING NOTE $3,000,000 Denver, Colorado September 24, 2003 For value received, the undersigned, SOUTHERN FLOW COMPANIES, INC., a Delaware corporation (the "Borrower"), hereby promises to pay on the Termination Date under the Credit Agreement (defined below), to the order of WELLS FARGO BUSINESS CREDIT, INC., a Minnesota corporation (the "Lender"), at its main office in Denver, Colorado, or at any other place designated at any time by the holder hereof, in lawful money of the United States of America and in immediately available funds, the principal sum of Three Million Dollars ($3,000,000) or, if less, the aggregate unpaid principal amount of all Revolving Advances made by the Lender to the Borrower under the Credit Agreement (defined below) together with interest on the principal amount hereunder remaining unpaid from time to time, computed on the basis of the actual number of days elapsed and a 360-day year, from the date hereof until this Note is fully paid at the rate from time to time in effect under the Credit and Security Agreement dated as of September 24, 2001 (as amended, supplemented or restated from time to time, the "Credit Agreement") by and between the Lender and the Borrower. The principal hereof and interest accruing thereon shall be due and payable as provided in the Credit Agreement. This Note may be prepaid only in accordance with the Credit Agreement. This Note has been executed and delivered in substitution for and not in repayment of the Note of the Borrower dated September 24, 2001, and is issued pursuant, and is subject, to the Credit Agreement, which provides, among other things, for acceleration hereof. This Note is the Revolving Note referred to in the Credit Agreement. This Note is secured, among other things, pursuant to the Credit Agreement and the Security Documents as therein defined, and may now or hereafter be secured by one or more other security agreements, mortgages, deeds of trust, assignments or other instruments or agreements. The Borrower shall pay all costs of collection, including reasonable attorneys' fees and legal expenses if this Note is not paid when due, whether or not legal proceedings are commenced. Presentment or other demand for payment, notice of dishonor and protest are expressly waived. SOUTHERN FLOW COMPANIES, INC. By: ________________________________ A. Bradley Gabbard Chief Financial Officer 2 ACKNOWLEDGMENT AND AGREEMENT OF GUARANTORS The undersigned, each a guarantor of the indebtedness of Southern Flow Companies, Inc. (the "Borrower") to Wells Fargo Business Credit, Inc. (the "Lender") pursuant to a separate Guaranty dated as of September 24, 2001 (the "Guaranty"), each hereby (i) acknowledges receipt of the foregoing Amendment; (ii) consents to the terms (including without limitation the amendment of Section 2.14 Termination of Corporate Guarantor Documents and the release set forth in Paragraph 14 of the Amendment) and execution thereof; (iii) reaffirms its obligations to the Lender pursuant to the terms of its Guaranty; and (iv) acknowledges that the Lender may amend, restate, extend, renew or otherwise modify the Credit Agreement and any indebtedness or agreement of the Borrower, or enter into any agreement or extend additional or other credit accommodations, without notifying or obtaining the consent of the undersigned and without impairing the liability of the undersigned under its Guaranty for all of the Borrower's present and future indebtedness to the Lender. METRETEK, INCORPORATED By: /s/ A. Bradley Gabbard ----------------------------------- Name: A. Bradley Gabbard Its: Chief Financial Officer METRETEK TECHNOLOGIES, INC. By: /s/ A. Bradley Gabbard ----------------------------------- Name: A. Bradley Gabbard Its: Executive Vice President POWERSECURE, INC. By: /s/ A. Bradley Gabbard ----------------------------------- Name: A. Bradley Gabbard Its: Chief Financial Officer