Headwaters (NYSE:HW) has been unleashed -- or at least, the market thinks it has.

The company, in a somewhat confusing way at first blush, made investors very happy on Tuesday, reporting a 70% decline in its net earnings to $13.7 million, or $0.31 a share. This was happily received, and the company's shares surged 25% on the day.

Confused? Don't be. Here's what's going on: First of all, the company exceeded consensus expectations. In many cases these days, that's infinitely more important than the year-over-year direction of earnings. Second, Headwaters, which I think lies somewhere between "hodgepodge" and "intriguing," managed to generate its earnings in the right places.

As you may know, Utah-based Headwaters is in three businesses: coal combustion products, building products, and energy. And while roughly half of its revenue comes from building products, everyone knows about the plight of that market, and few observers fretted when the unit's revenue and margins slid. Rivals Builders FirstSource (NASDAQ:BLDR) and Eagle Materials (NYSE:EXP) are in similarly sticky situations.

Headwaters' real pizzazz is in the energy segment, which both cleans coal -- sales of clean coal leaped from less than $500,000 to $13.1 million in a single year -- and markets an HCAT technology for upgrading heavy oil in refineries. At this point, the system is in three refineries, "who continue their review of HCAT." After disappointing results from the HCAT technology in its last go-round, investors can take heart that one of the refineries running the system is now targeting a reintroduction of the technology in the fourth quarter.

If you consider Headwaters closer to the "intriguing" end of the scale, you need to know that the company is highly seasonal, with most of its operating income coming from the June and September quarters. You also should be aware that the June quarter benefited from a tax rate that was about a third the estimated rate for the year.

Having said that, I'm inclined to keep at least one eye on this intriguing hodgepodge. And if the energy segment continues to show progress, and the HCAT technology lives up to its promise, Headwaters could be worth attention from both eyes.

For related Foolishness:

Headwaters is a Motley Fool Rule Breakers recommendation. Try the market-stomping service today free for 30 days.

Fool contributor David Lee Smith doesn't own shares in any of the companies mentioned above. He does, however, encourage you to send along your questions or comments. Builders FirstSource is an Inside Value recommendation. The Fool has a disclosure policy.