Molina Healthcare lost $230 million in the second quarter this year — catching investors, who expected a slim profit, off guard. The Affordable Care Act exchanges wreaked havoc on the health insurer, which is pulling out of Utah and Wisconsin, pruning its participation in other states and laying off 7% of its workforce. Most of Molina's business is in Medicaid contracts with states.

The numbers: $230 million net loss, compared with a $33 million profit in the same period a year ago. Revenue increased 15% to $5 billion. Molina will cut expenses by up to $400 million by the end of next year — $55 million has already come from layoffs and restructuring.

What happened: Molina, which had previously made a profit with its ACA plans, largely miscalculated the medical costs of its ACA enrollees. The company experienced huge losses in Florida, Ohio, Utah, Washington and Wisconsin. In the areas where Molina is staying, the insurer will hike premiums for its ACA plans by 55% on average, partially blaming the "uncertainty around the funding of marketplace cost-sharing subsidies." Molina is a sizable ACA player, but nearly all people losing Molina coverage will have another option in their area.

More on the restructuring: Aside from the layoffs, Molina will cut vendor costs and restructure contracts with hospitals and doctors it considers to be "high-cost."

Of note: This is the first quarter for Molina since the company fired CEO Mario Molina and CFO John Molina, brothers whose father founded the company in 1980. Their firings cost the company $43 million in the quarter. Molina said it was "encouraged by the response" for the open CEO position.