Exhibit 10.2

Bonus Agreement

This Agreement is entered into on July 2, 2007, by ThermoEnergy Corporation, a
Delaware corporation with offices located at 124 West Capitol Avenue, Suite 880,
Little Rock, Arkansas 72201 (the “Buyer”), CASTion Corporation, a Massachusetts
corporation (“CASTion”), and Donald F. Farley (the “Agent”) as agent for certain
employees of CASTion whose name and address are set forth at the end of this
Agreement (the “Employees”).

WHEREAS, CASTion, certain shareholders of CASTion, and the Buyer are parties to
that certain Agreement for the Purchase and Sale of Securities dated as of July
2, 2007, pursuant to which certain shareholders of CASTion will sell to the
Buyer all of the capital stock of CASTion owned by such shareholders, and all of
their rights under certain promissory notes issued by CASTion, in exchange for a
combination of cash and securities to be issued by the Buyer (the
“Acquisition”);

WHEREAS, CASTion employs the Employees and the Employees provide services to
CASTion;

WHEREAS, CASTion and the Buyer wish to reward the Employees for their past
contributions to CASTion; and

WHEREAS, the execution and delivery by the Buyer of this Agreement is a
condition precedent to the consummation of the Acquisition by CASTion and its
shareholders;
 
NOW, THEREFORE, in consideration of the mutual promises, agreements and
provisions contained in this Agreement, and for other good and valuable
consideration, the receipt and adequacy of which are hereby acknowledged, the
parties agree as follows:
 
1. Allocation of Bonuses. CASTion has allocated an aggregate of $300,000 to the
Employees in the respective amounts identified on Schedule A hereto (such
amounts having been determined and agreed to by the compensation committee of
CASTion’s board of directors prior to the consummation of the Acquisition). Such
amounts shall be unvested, and no Employee shall have any right to receive any
amount under this Agreement except as set forth herein.

2. Vesting of Bonuses. The right of each Employee to receive the amount set
forth opposite his or her name on Schedule A shall vest on the first to occur of
the following events:

(a) Upon the consummation by the Buyer, or any of its subsidiaries (including
CASTion), of a Financing Transaction (as defined below), the net proceeds of
which to the Buyer or such subsidiaries, taken together with the net proceeds of
all prior Financing Transactions, but without taking into account any prepayment
of the Convertible Notes issued by the Buyer in connection with the Acquisition
upon the consummation of any Financing Transaction, is greater than
$3,000,000.00, each Employee shall vest in the right to receive his or her pro
rata share (as determined for each employee by dividing the amount set forth
opposite his or her name on Schedule A by $300,000) of the amount which is
1.875% of the amount by which the net proceeds to the Buyer in such Financing
Transactions exceed $3,000,000 (the “Vested Amount”).
 

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

(b)  Upon the consummation of a Change of Control of the Buyer, each Employee
shall vest in the right to receive the amount set forth opposite his or her name
on Schedule A.

(c)  The vesting of rights under this Agreement shall be cumulative, but in no
event shall any Employee be entitled to receive more under this Agreement than
the amount set forth opposite his or her name on Schedule A.

3. Payment of Bonuses.

(a)  The Buyer shall pay, or shall cause CASTion to pay, to all Employees the
Vested Amounts immediately upon the occurrence of an event identified in Section
2(a) above.

(b) The Buyer shall pay, or shall cause CASTion to pay, to all Employees the
amounts set forth opposite their respective names immediately upon the
occurrence of an event identified in Section 2(b) above, less any amount(s)
previously paid under Section 3(a).

4. Definitions. For purposes of this Agreement:

(a) “Financing Transaction” shall have the definition assigned to such term in
the Convertible Notes.

(b) “Change of Control” shall mean (i) the acquisition by any one person, or
more than one person acting as a group, of ownership of stock of the Buyer that,
together with stock held by such person or group, constitutes more than 50
percent of the total fair market value or total voting power of the stock of the
Buyer; (ii) the sale, conveyance, transfer or other disposition by the Buyer of
all or substantially all its property, assets or business to another person, or
(iii) the acquisition by any one person, or more than one person acting as a
group (whether in one transaction or during the 12-month period ending on the
date of the most recent acquisition by such person or persons) of ownership of
stock of the Buyer possessing 50 percent or more of the total voting power of
the stock of the Buyer.
 
5. Reductions for Tax Withholding. Payment of any amounts under this Agreement
shall be reduced by all required payroll withholding and other taxes, which
amounts will be paid over to applicable tax authorities in payment of such
taxes.

6. Nature of Relationship. This Agreement is not an employment contract and,
subject to the terms of any other agreement between an Employee and the Buyer or
CASTion, the Buyer and CASTion reserve the right to terminate the employment of
any Employee at any time with or without cause. The termination of an Employee’s
employment with Buyer or CASTion, with or without cause, however, shall not
terminate any of the obligations of Buyer or CASTion under this Agreement, all
of which shall survive the termination of such employment.
 

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

7. Rights under this Agreement. No Employee shall have any rights under this
Agreement unless and until Acquisition is consummated.

8.  Concerning the Agent.

(a) As soon as practicable after the consummation of the Acquisition, the Agent
shall deliver a copy of this Agreement to each Employee; provided, however, that
in lieu of providing a copy of Schedule A hereto, the Agent shall deliver a
written instrument to each Employee setting forth the amount to which the
respective Employee has been allocated pursuant to this Agreement. No Employee
(with the exception of the Agent) shall have any right to obtain a copy of
Schedule A in its entirety or to learn of the amounts allocated to any other
Employee.

(b)  The Agent shall be entitled to enforce this Agreement on behalf of the
Employees, but shall not be obligated to do so. If the Agent declines to enforce
this Agreement, he shall notify the Employees of their right to do so under
Section 9 of this Agreement.

(c) The Agent shall not be responsible to any Employee for the payment of any
sums hereunder (other than to remit to any Employee any amount which may be paid
to the Agent on behalf of such Employee) or for any action taken or omitted to
be taken by him hereunder or in connection herewith, except for his own gross
negligence or willful misconduct as determined by a final non-appealable
judgment of a court of competent jurisdiction.

9. Third Party Beneficiaries. Each Employee, together with his or her
administrators, executors, estates and heirs, shall be third party beneficiaries
of this Agreement and shall have the right to enforce this Agreement with
respect to such Employee.

10. Miscellaneous.

(a) This Agreement may be executed in two or more counterparts, each of which
will be deemed an original and all of which together will constitute one
instrument.
 
(b) If any provision of this Agreement is invalid, illegal or unenforceable in
any respect, the validity, legality and enforceability in every other respect of
such provision and of the remaining provisions shall not in any way be affected
or impaired thereby. If a court determines that any provision herein is invalid,
illegal or unenforceable, for any reason, such provision shall be deemed amended
to the extent necessary to comply with such determination, and such provision,
as so amended, shall be valid and binding as though the invalid, illegal or
unenforceable portion had not been included herein.
 
(c) This Agreement constitutes the complete, final and exclusive statement of
the agreement between the parties pertaining to the subject matter hereof and
supersede all prior agreements, understandings, negotiations and discussions,
whether oral or written, of the parties. No amendment, supplement, modification,
rescission or waiver of this Agreement shall be binding unless executed in
writing by the parties. No waiver of any of the provisions of this Agreement
shall be deemed or shall constitute a continuing waiver unless otherwise
expressly provided. The parties expressly acknowledge that they have not relied
upon any prior agreements, understandings, negotiations and discussions, whether
oral or written.
 

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

 
(d) This Agreement shall be binding upon and shall inure to the benefit of the
parties, their successors, assigns and legal representatives. This Agreement
shall be governed by and construed in accordance with the laws of the
Commonwealth of Massachusetts. Any action or proceeding arising out of or
related to this Agreement may be brought in the state or federal courts which
have jurisdiction over Middlesex County in the Commonwealth of Massachusetts.
 
IN WITNESS WHEREOF, the parties hereby execute this Agreement as of the date set
forth below.
 

THERMOENERGY CORPORATION   CASTION CORPORATION           By: /s/ Andrew T.
Melton     By: /s/ Jeffrey L. Powell   

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

Authorized Signature    

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

Authorized Signature       Name:
 Andrew T. Melton
   Name: Jeffrey L. Powell           Title:  EVP and CFO   Title: CEO          

 
/s/ Donald F. Farley

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

 Donald F. Farley
As Agent for the Employees
 

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

 
SCHEDULE A

Employee
 
Amount of Bonus
         
Jeffrey L. Powell
 
$
200,000.00
 
Steven Brown
   
30,000.00
 
Mark Simon
   
20,000.00
 
Phil Kemp
   
20,000.00
 
George Chapas
   
20,000.00
 
Ed Jablonski
   
10,000.00
 
Total
 
$
300,000.00
 

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