Linn Permian rig. Source: Company website.

Linn Energy LLC (OTC:LINEQ) and its financial holding entity LinnCo (NASDAQ: LNCO) have taken it on the chin over the past year. Obviously, the primary culprit was the rout in the oil market. The price of crude oil fell from about $100 per barrel at its 2014 peak to roughly $45 per barrel at its 2015 low. As a upstream exploration and production company, Linn was hit extremely hard.

Things got even worse a couple weeks ago when Linn stock fell double-digits after the company announced a major secondary unit offering. Linn sold 16 million units at an average price of $11.79 per unit. This is well below where Linn was trading just a few months ago. In fact, Linn shares exchanged hands at $30 this time last year.

Still, Linn had good cause to conduct this offering now. Here's why Linn's transaction made sense, and why better days might lie ahead for the embattled oil and gas producer.

Getting some relief
Linn took on significant debt as a result of its $4.3 billion acquisition of Berry Petroleum, $1.8 billion of which was the assumption of Berry's debt. With oil and gas prices getting slammed and a debt-heavy capital structure, Linn needs some flexibility. Linn could use any relief on its existing Berry credit facility it can get, because it's essentially maxed out.

Linn's Berry credit facility has a borrowing base of $1.4 billion, but as of the end of last year, there was less than $1 million of available borrowing capacity. That's exactly what it's getting with its secondary offering. The transaction will raise approximately $181 million in net proceeds to repay debt under the company's existing credit facility, which was primarily incurred to repurchase Linn and Berry's senior notes.

On the surface, it seems questionable for Linn to offer units that yield 10% to retire less-costly debt. It doesn't appear to make sense to incur a near-term cash burn when the company needs as much cash as possible during the oil and gas downturn. But other considerations might be in play. For instance, reducing debt could improve Linn's position with creditors. Linn did have approximately $10.4 billion in debt at the end of last quarter after all.

Meanwhile, things appear to be improving
The unit offering aside, Linn's situation does seem to be improving. The company's oil and gas production grew 2% last quarter, even though it cut capital spending by a whopping 65%. This implies Linn's shifting focus toward higher-quality assets with lower rates of decline is working as management had hoped.. Linn also saved a significant amount of cash by slashing its distribution by 57%. Linn has taken an ax to its spending as a result of the oil crash, including its reductions in distributions and its capital budget. Fortunately, these spending reductions appear to put Linn on firmer footing. The company expects to fund its 2015 distributions and oil and gas capital spending entirely from internally generated cash flow.

In addition, Linn has strong hedging policies in place to help insulate it against further deterioration. Linn entered into additional oil swaps earlier this year, which mean the company is now hedged 80% of its 2015 oil production at an average price of $91 per barrel. Moreover, Linn is fully hedged on its natural gas production at an average price of $5.12 per MMBtu..

Separately, the price of oil has recovered significantly from last quarter. West Texas Intermediate is back to nearly $60 per barrel, meaning the current quarter's results could improve from the preceding three-month period.

The Foolish takeaway
The bottom line for investors is that while markets typically punish companies for selling new units, reducing debt is a good strategy for Linn Energy. Excessive debt can force a company into dire straits, which was a real concern for exploration and production companies when the price of oil collapsed. Selling new units is costly as well, but the company can always cut its distribution again if conditions deteriorate further. Meanwhile, Linn got some much-needed debt relief, as its current Berry credit facility is maxed out. And, if the oil market stabilizes, Linn's operations could continue to improve from here.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.