Lowe's is slimming down to better compete with Home Depot.

The company, which recently hired Marvin Ellison away from JCPenney (JCP) to be its CEO, said it is shutting down its Orchard Supply Hardware stores and plans to slash inventory at its Lowe's stores.

The home improvement retailer did report earnings that topped forecasts on Wednesday, thanks to a healthy housing market. Shares surged more than 7% in early trading on the news.

Related: Sears is closing another 46 stores

But Lowe's (LOW) cut its sales and profit outlook for the year.

The retailer is playing catch-up to industry leader Home Depot (HD), which just last week reported strong results.

Sales at Lowe's stores open at least one year rose 5.3% in the second quarter. That sounds impressive until you consider that Home Depot's sales were up more than 8%.

Ellison appears unafraid to make some big changes to help Lowe's become more competitive.

The company said Wednesday that the 99 Orchard Supply Hardware stores that Lowe's owns in California, Oregon and Florida, as well as a distribution center, will be shut down by the end of the fiscal year.

Orchard Supply Hardware has 4,300 employees. Ellison said in the earnings release that the chain's workers will be given "priority status" if they apply for other jobs at Lowe's and will also receive job placement assistance and severance.

Lowe's bought Orchard Supply Hardware only five years ago for $205 million.

The company said Wednesday its earnings were cut by $230 million as a result of the planned closings. Lowe's also expects to incur an additional $390 to $475 million in costs in the second half of the year related to the closings.

That's one of the reasons for the weaker guidance. But Lowe's is also planning to shake up the product offerings in its stores -- which will hurt sales in the short-term.

Ellison said Lowe's will "aggressively rationalize store inventory" and cut back on lower-performing items.

And if all that wasn't enough, Lowe's announced Wednesday it was hiring David Denton, currently the chief financial officer of CVS (CVS), to be its new CFO.

Lowe's said Denton will join the company after CVS completes its acquisition of insurer Aetna (AET), which is expected to close sometime before the end of the year. Lowe's current CFO, Marshal Croom, plans to retire in October.

The hiring of Denton is the latest in a series of executive shakeups that have taken place since Ellison joined Lowe's.

In July, Ellison announced a restructuring of the C-suite, saying that the company was eliminating the chief operating officer and chief customer officer positions as well as several other senior leadership positions.