Exhibit 10.4
                              AMENDED AND RESTATED
                            TAX ALLOCATION AGREEMENT


             THIS AMENDED AND RESTATED AGREEMENT is made as of December
        4, 1996 between Thermo Electron Corporation, a Delaware
        corporation ("Thermo Electron"), and Thermo Ecotek Corporation, a
        Delaware corporation ("Ecotek").


                              Preliminary Statement


             Thermo Electron is the parent of an affiliated group of
        corporations (including Ecotek) within the meaning of Section
        1504(a) of the Internal Revenue Code of 1986, as amended (the
        "Code").

             Thermo Electron owns over 80% of the issued and outstanding
        shares of voting common stock of Ecotek, the only class of stock
        that Ecotek is authorized to issue.     Ecotek is required to
        file consolidated federal income tax returns with Thermo
        Electron.

             Thermo Electron, as the common parent of an affiliated group
        of corporations, and Ecotek recognize that any one of them that
        sustains a net operating loss or otherwise generates beneficial
        tax attributes for a taxable period may be deprived of such
        benefits when offset in that or other periods against income or
        tax liabilities of the others.


                                   Agreements


             IT IS MUTUALLY agreed by the parties hereto as follows:

             1.   Definitions and Construction.

                  1.1  The Term "Thermo Electron Group" means the group
        of corporations of which Thermo Electron is common parent and
        with which Thermo Electron files a consolidated federal income
        tax return, excluding Ecotek and subsidiaries of Ecotek that may
        exist now or in the future.  For purposes of this Agreement, the
        Thermo Electron Group shall be treated as a single corporate
        entity.  The Thermo Electron Group and Ecotek and its
        subsidiaries, respectively, are sometimes herein referred to
        collectively as the "Two Companies" or the "Companies."  The term
        "Deficit Company" means either one of the Companies that has an
        ordinary loss, capital loss, special deduction or tax credit
        arising in a consolidated return year, or in a prior separate
        return year, that is utilized to a greater extent in the then
        current consolidated federal income tax return than would have
PAGE
<PAGE>
        been the case if the Company had filed a separate federal income
        tax return for the year.  This Agreement anticipates that Thermo
        Electron will set aside and retain certain sums calculated as
        provided herein.  All reference to Thermo Electron paying sums to
        itself pursuant to this Agreement shall be satisfied by Thermo
        Electron setting aside sums in respect of the obligations
        established under this Agreement.

                  1.2  The paragraph titles used herein are for
        convenience of reference only and will not be considered in the
        interpretation or construction of any of the provisions hereof.
        Words may be construed in the singular or the plural as the
        context requires.

             2.   Tax Returns.

                  2.1  Federal Tax Returns.  Thermo Electron as the
        common parent will prepare and file or cause to be prepared and
        filed federal and state income tax returns on a consolidated
        basis, for the Thermo Electron Group and Ecotek and its
        subsidiaries for all fiscal periods as to which a  consolidated
        return is appropriate in accordance with the terms of this
        Agreement.

                  2.2  State Tax Returns.  Thermo Electron as the common
        parent will prepare and file or cause to be filed state income
        tax returns on a combined, consolidated, unitary, or other method
        that Thermo Electron believes will result in a lower overall tax
        liability to the Two Companies.  Ecotek will reimburse Thermo
        Electron for its portion of the tax.  Such reimbursement will be
        the tax Ecotek would have paid on a separate return basis, but
        only if it was required to file a return in that state.

             3.   Time of Payment of Federal Obligations to Thermo
        Electron.  The obligations of the Companies for Federal income
        tax payments will be determined and paid as follows:

                  (a)  Not later than the 15th day after the end of the
        fourth, sixth, ninth and twelfth months of each consolidated
        taxable year of Thermo Electron, Thermo Electron will make a
        reasonable determination (consistent with the provisions of
        Section 6655 of the Code) of the separate federal income tax
        liability that each Company would be required to pay as estimated
        payments on a separate return basis (without regard to
        alternative minimum tax) for that period.  Each Company shall pay
        to Thermo Electron the amount of such liability within ten days.

                  (b)  After the end of Thermo Electron's fourth
        accounting quarter and before the 15th day of the third month
        thereafter, each Company will promptly pay to Thermo Electron the
        entire amounts estimated to be due and payable under such
        Company's federal income tax return as if filed on a separate
        return basis, less all amounts previously paid with respect to
        that year pursuant to subparagraph (a) of this Paragraph 3.
PAGE
<PAGE>
                  (c)  If upon the filing of the consolidated income tax
        return, a revised calculation is made in the manner set forth in
        subparagraph (b) of this Paragraph 3, and it is determined that
        either Company has paid to Thermo Electron with respect to the
        consolidated taxable year an amount greater than that required by
        Paragraph 3(b), then that excess will be promptly paid by Thermo
        Electron to that Company.

             4.   Tax Obligations of Thermo Electron.  Thermo Electron
        will pay the consolidated tax liabilities of the Companies
        arising from filing a consolidated federal tax return.

             5.   Payment of Funds by Thermo Electron. If in any year
        Ecotek incurs a loss or generates tax credits or similar tax
        benefits (a "tax benefit item"), Thermo Electron shall pay to
        Ecotek a sum equal to the amount of benefit realized by Thermo
        Electron that is attributable to the  Ecotek tax benefit item;
        payments due to Ecotek from Thermo Electron under this section
        shall be made upon the earlier of (1) the year in which Ecotek
        would have obtained a tax benefit from the tax benefit item if
        Ecotek had in all years filed a separate federal income tax
        return or (2) the year in which any applicable carry-forward
        period with respect to the tax benefit item expires; provided
        that payments under this section shall be made first by being
        taken into account in determining amounts payable to Ecotek under
        Section 3, and any remaining amount due to Ecotek shall be paid
        by Thermo Electron to Ecotek at the times set forth for payments
        by Ecotek under Section 3.

             6.   Changes in Prior Year's Tax Liabilities.  In the event
        that the consolidated tax liability or the separate tax liability
        referred to in Paragraphs 3 and 5 hereof for any year for which a
        consolidated tax return for the two Companies was filed is or
        would be increased or decreased by reason of filing an amended
        return or returns (including carry-back claims), or by reason of
        the examination of the returns by the Internal Revenue Service,
        the amounts due Thermo Electron for payment of taxes under
        Paragraph 3 hereof, and the amount to be paid to Thermo Electron
        for allocation to Ecotek under Paragraph 5 hereof for each year
        will be recomputed by Thermo Electron to reflect the adjustments
        to taxable income and tax credits for the taxable year and
        interest or penalties, if any.  In accordance with those
        recomputations, additional sums will be paid by the Companies to
        Thermo Electron or paid by Thermo Electron to the Companies
        regardless of whether a member has become a Departing Member (as
        defined in Paragraph 8 hereof) subsequent to the taxable year of
        recomputation.

             7.   New Members.  The Companies agree that if, subsequent
        to the execution of this Agreement, Thermo Electron becomes the
        Parent, as that term is used in Section 1504 of the Code, of one
        or more subsidiary corporations, ion addition to Ecotek, then
        each newly-acquired subsidiary corporation may become a separate
PAGE
<PAGE>
        party to this Agreement by consenting in writing to be bound by
        its provisions, effective immediately upon its delivery to Thermo
        Electron, but the income, deductions and tax credits of the
        newly-acquired subsidiary corporations will first be included in
        the consolidated federal income tax return as required by the
        Code.

             8.   Departing Members.

                  8.1  The term "Departing Members," as used herein, will
        mean a Company that is no longer permitted under the Code to be
        included in the consolidated federal income tax return.

                  8.2  In applying this Agreement to a Departing Member
        for the final taxable year in which its income, deductions, and
        tax credits are required to be included in the consolidated
        federal income tax return:  (i) the amount required to be paid by
        a Departing Member under the provisions of Paragraph 3 hereof and
        (ii) the amount that the Departing Member is entitled to receive
        under the provisions of Paragraph 5 hereof, will be determined by
        taking into account the income, deductions and tax credits of the
        Departing Member only for the fractional part of such year as the
        Departing Member was a member of the consolidated group and
        included in the consolidated federal income tax return.

                  8.3  After the filing of the consolidated federal
        income tax return for the last taxable year that the Departing
        Member was included therein, the Departing Member will be
        informed of the amount of consolidated carry-overs as of the end
        of the taxable year or period which are attributable to the
        Departing Member, as provided by Treasury Regulations Section
        1.1502-79 or otherwise, including the agreement of the parties.

             9.   Determination of Sums Due from and Payable to Members.
        Thermo Electron will determine the sums due from and payable to
        the Companies under the provisions of this Agreement (including
        the determination for purposes of Paragraph 6 hereof).  The
        Companies agree to provide Thermo Electron with such information
        as may reasonably be necessary to make these determinations.
        Issues arising in the course of the determinations that are not
        expressly provided for in this agreement will be resolved in an
        equitable manner.

             10.  Tax Controversies.  If a consolidated federal income
        tax return for any taxable year during which this Agreement is in
        effect is examined by the Internal Revenue Service, the
        examination, as well as any other matters relating to that tax
        return, including any tax litigation, will be handled solely by
        Thermo Electron.  Ecotek will cooperate with Thermo Electron and
        to this end will execute protests, petitions, and any other
        documents as Thermo Electron determines to be necessary or
        appropriate.  The cost and expense of Thermo Electron's handling
        of a tax controversy, including legal and accounting fees, will
        be allocated to and paid by the Company to whom the tax
PAGE
<PAGE>
        controversy relates.  If the tax controversy relates to both
        Companies, the cost and expense will be allocated between the
        Companies in the proportion that each Company's potential
        additional tax liability bears to the total potential additional
        tax liability of both Companies (determined in accordance with
        Paragraph 6 hereto and assuming that the tax controversy is
        resolved in favor of the Internal Revenue Service) for the
        taxable year on issue.  If the tax controversy encompasses more
        than one taxable year, Thermo Electron will first allocate the
        cost and expense to each taxable year in the proportion that the
        potential additional tax liability for each taxable year bears to
        the total potential additional tax liability for the taxable
        years in issue.

             11.  Effective Date.  This Agreement shall be effective
        beginning as of the date of this Agreement, and will continue on
        a year-to-year basis thereafter with respect to Ecotek for so
        long as Ecotek is permitted to file a consolidated federal income
        tax return with Thermo Electron.

             12.  State Taxes.  The two Companies will jointly file any
        state tax return on a combined, consolidated, unitary, or other
        method that Thermo Electron determines results in a lower overall
        tax liability to the Two Companies.  In the event that said state
        tax returns shall be filed, the provisions of Sections 1-11
        hereof shall apply, mutatis mutandis (the necessary changes being
        made) to the allocation, preparation, filing and payment related
        to such state taxes and tax returns provided, however, that any
        benefit realized by the filing of the combined, consolidated or
        unitary return will remain with Thermo Electron.

             IN WITNESS WHEREOF,  the parties hereto have caused this
        Agreement to be executed by their duly authorized officers as of
        the date first above written.


                                      THERMO ELECTRON CORPORATION


                                      By:
                                      ________________________________

                                      Title:
                                      _______________________________


                                      THERMO ECOTEK CORPORATION


                                      By:
                                      _________________________________

                                      Title:

                                      --------------------------------