Dairy giant Dean Foods (NYSE:DF) has made all of the right moves to adapt to troubling industry trends and to fix internal problems -- mainly high debt loads. The company sold one division and has spun off another, White Wave Foods, unlocking shareholder value and ridding itself of the associated debt loads. Since its restructuring kicked in, roughly one year ago, the stock has moved up an impressive 36%, but in the recent earnings report, management forebode a difficult third quarter, sending the stock down 10%. Can Dean Foods continue to maneuver around the struggling dairy industry and maintain its string of success?

Earnings recap 
Dean Foods' second-quarter earnings came in below expectations, with the bottom line coming in at $0.13 per share, as opposed to consensus estimates of $0.14 per share. The number was, however, in the middle range of management's prior guidance. On a year-over-year basis, earnings grew by $0.01. On the top end of the income statement, sales came in slightly lower than the prior year's at $2.23 billion. While Dean Foods has made strong improvements throughout the various levels of its operations, it cannot combat the overall trend that management mentioned -- declining fluid milk consumption.

The most troubling note from the earnings release, as previously mentioned, is management's guidance for the coming quarter. In the third quarter, Dean Foods is expecting that decline in fluid milk consumption to accelerate faster than previously predicted. Still, due to cost-cutting measures, Dean Foods is expecting to grow operating income in the low single digits (previously guided to be as high as mid-single digits) and continue to slash costs across the board. In an announcement alarming to some, the company mentioned that anywhere between eight and 12 factories will be closed as part of a $120 million savings effort through the end of 2013.

Is it wise to invest in a company whose product demand is clearly eroding, or does Dean Foods have enough tricks left to squeeze bigger profits out of the business?

The big picture 
Caps off to management for a job well done. Dean Foods has recovered well from its debt-laden days and has emerged a more nimble company that can find growth in a very, very mature market.

Shutting down such a large number of factories indeed raises questions as to the future viability of the fluid milk business, but it's the right move for the company and investors will see the fruits of this labor in subsequent quarters. Though perhaps not a buy-and-hold-forever stock, Dean Foods appears attractive on the basis of its effective management team and continued cost-cutting and restructuring.