Following another two and a half hours of surgery at Toronto’s Sick Kids Hospital on Tuesday, she can filter out carbon dioxide and maintain her body’s oxygen levels on her own.

The ECMO machine Kayla dubbed Loretta was out of work — hopefully for good.

“Great news,” said Kayla’s mom Susan Tremblett in an email to The Record on Tuesday afternoon. “The ECMO is gone. She is working the lung the way they want it to work. We are in the right direction now.”

And that was a relief to Tremblett, who watched over her 14-year-old daughter, along with Kayla’s father, Frank Baker. Tuesday’s surgery began with much trepidation.

Kayla’s tiny chest had to be opened and expanded.

Her inspiring recovery, and the exchange of carbon dioxide, depended on it.

The pulmonary fibrosis that stiffened her own lungs was the culprit.

“Her chest was so small because of the pulmonary fibrosis,” Tremblett said.

“This didn’t allow her chest to grow.”

After two years on a waiting list for a new lung, the prayers of Kayla and her family were answered by an anonymous donor whose family had endured their own tragedy.

But in that loss, whatever it was, they gave Kayla hope for a long life with a new lung.

Kayla felt “wonderful” a day after surgery.

Two days after the operation, a wave of green ribbons and signs appeared across Cambridge in an outpouring of affection for the St. Benedict high school student.

Well-wishers from around the world — including South African signatures on a petition calling on the Senate to make April 5 a national organ donation day — clicked on a Facebook group that boasts more than 8,500 members supporting the girl’s mission to promote organ donation.

But the usual complications of such a serious operation emerged over the weekend.

Troublesome blood clots were removed from her chest. She was put on dialysis after her kidneys shut down. But that’s to be expected, due to all the medications and other fluids, her mother explained.

Prior to surgery on Tuesday, Kayla was determined to carry on her recovery.

Her chest may have been a size too small, but her heart was as big as ever.

Calm and focused is how her mom, a call centre manager, described her before surgery.

Kayla drew strength from her supporters. Before she got her lung, the mayor of Cambridge visited her and gave her a blanket. That was nice. But then two stars of the Vampire Diaries, Ian Somerhalder and Nina Dobrev, paid her a visit.

Politicians are nice. But TV bloodsuckers are preferable.

“She loved the visit,” Tremblett said of Kayla’s chat with the actors. “It was the second-best thing, she said.”

Getting the new lung was the best thing. Now, if she can recover, she can help make sure others get the organs they are waiting for.

That’s Kayla’s chosen mission. It’ll still have to wait.

“Still not out of the woods yet,” her mother said. “But closer, I guess we can say.”