From adverse plant inspections to glaring gaps in its heart device product line, Abbott Laboratories is steadily working to resolve the unfinished business of former Minnesota medical device maker St. Jude Medical.

Illinois-based Abbott bought St. Jude Medical in a roughly $30 billion deal in January, but it turns out Abbott officials had been working alongside St. Jude employees since August 2016 at the Sylmar, Calif., plant where Food and Drug Administration inspectors recently hit the company with a warning letter for issues involving cybersecurity and lithium battery failures.

"We had a very detailed plan that we shared with the FDA after we received the warning letter," Abbott CEO Miles White said in an investor call Thursday to discuss second-quarter earnings that beat estimates. "We had been working with [St. Jude officials] on a lot of issues, questions, processes and so forth in Sylmar for a year now. And that is a huge positive, because it gave us a real running head start on things the FDA observed when it did [an] inspection early in the year. So that gave us a big lead."

St. Jude was also quickly losing share in the market for heart devices around the time of the acquisition, because the company lacked FDA approval for pacemakers and implantable heart defibrillators that are certified to be compatible with MRI scanners. Competitors Medtronic PLC and Boston Scientific Corp. already have MRI-compatible certifications for many of their heart devices, and patients are gravitating toward devices with that feature.

Looking just at pacemakers, St. Jude lost about 7 percentage points of market share to MRI-compatible devices, but it has regained 4 points since FDA approval of Abbott's Assurity MRI pacemaker and Tendril device leads in February, White said. Submissions for MRI-compatible defibrillators are pending with the FDA.

With implantable heart-rhythm devices now making up more than 8 percent of Abbott's total revenue, investors are still feeling "cautious" about the business segment, analysts with Leerink Partners wrote Thursday.

Sales in the division — which includes heart-rhythm devices like pacemakers and implantable defibrillators — dropped 9 percent compared to the same quarter last year, to $552 million worldwide. In the U.S., where retail prices can be particularly important to sales, heart-rhythm device revenue sank nearly 14 percent, according to adjusted figures in Abbott's earnings presentation Thursday.

White noted that cardiac-rhythm devices are "extremely profitable and they generate high cash flows," and he emphasized that the company was on track to close the MRI gap with FDA approvals for compatible defibrillators, likely by the end of 2017. He also said the pending FDA warning letter at the Sylmar plant doesn't mean that the regulator will block new approvals until it's resolved.

Overall, medical devices make up the largest of Abbott's four business segments, with $2.6 billion in revenue in the second quarter. On an adjusted basis, medical-device sales grew by 3.2 percent in the three months ended June 30.

Companywide, the Abbott Park, Ill.-based maker of prescription and consumer-facing health care supplies and medical devices posted better-than-expected earnings and increased full-year guidance.

Overall adjusted diluted net earnings from continuing operations were $1.1 billion on $6.6 billion in revenue, which amounted to 62 cents of adjusted earnings per share. The quarterly EPS was a penny above Wall Street forecasts, and well above last year's 55 cents per share.

Abbott shares rose nearly 3 percent Thursday, closing at to $50.85 — the highest closing price in two years.

"Halfway through the year, we're on track with all of our key priorities. The integration of St. Jude continues to go well, and we're right on track with our deal model and projected synergy targets," White said.

Looking ahead, Abbott raised its 2017 guidance for diluted earnings to a range of $2.43 to $2.53, an increase of 3 cents on both ends of the range.

The financial impact of events in the broad category of "specified items" — including expenses related to acquisitions and cost-reduction initiatives as well as financial gains from divestiture — were adjusted to $1.40 per share in the full-year guidance, down 8 cents a share from previous guidance.