Vancouver, British Columbia (CNN) -- With a wink of its eye, Canada brought to close the Winter Olympics by making fun of one the glitches that plagued the first week of the games.
As the closing ceremonies began, a mime with a tool belt came out to the caldron, where one of the legs was still in the floor of BC Place, having failed to rise during the opening ceremonies 17 days ago. The mime found the power cords weren't connected, but when he plugged it in, sparks flew from the power supply. The mime found a rope and pretended to pull the fourth leg up into place as the crowd roared its approval.
It was with a smile that Canada wrapped up the games, having won the most gold medals any nation has won in any Winter Olympics and having won back the hockey gold medal it feels should permanently reside here.
It was a 180-degree reversal from the way the games began when critics complained about the warm, rainy weather, observers criticized the safety of the track after the death of a luger in a training run and Canadians wondered what was going on with the caldron and their athletes, for whom officials from the host nation had predicted overwhelming success.
As the opening ceremonies came to a close, speed skating legend Catriona LeMay Doan was left there, with her torch, wondering what to do. And Canadians asked themselves: What next?
LeMay Doan got her chance to light the caldron after all. As the mime raised the stubborn leg during the closing ceremonies, LeMay Doan came out beaming with her torch.
She wasn't the only Canadian beaming Sunday. Despite a slow first week on the tracks, rinks and courses of the games, the home team became a story of resiliency and national pride.
Joannie Rochette, who lost her beloved mother to a heart attack two days before she was to compete in the first night of figure skating, was chosen as the Canadian flag bearer for the closing ceremonies. The 24-year-old skater will long be remembered as the symbol of these games for her strength in a time of personal crisis.
Rochette skated flawlessly in that first night of the competition, then dazzled the crowd in the free skate, winning the bronze medal, the hearts of a nation and the respect of those watching around the world.
Years from now, they will talk of her strength and her bravery, but she just saw herself as the daughter who shared a dream with a mother who wouldn't let her fail.
She wasn't perfect in her performance, but in an imperfect games, she was a beacon of all that is right about sports.
The head of the host organization said his nation was proud of the way it had revealed itself to each other and to the world.
"I believe we Canadians tonight are stronger, more united, more in love with our country and more connected with each other than ever before," John Furlong, chief executive officer of VANOC, said. "These Olympic Games have lifted us up. If the Canada that came together on opening night was a little mysterious, it no longer is. Now you know us, eh?"
The rest of the closing ceremony became a lighthearted tribute to Canada, featuring comedians and some of its most famous singers, like Neil Young, Michael Buble and Alanis Morissette.
These Olympics needed saving. Even as thousands of fans and reporters were arriving the first week, it almost seemed as if the games were a national embarrassment.
The problems actually started a month before the Olympics opened, as Vancouver went through the warmest January in history. The well-above-freezing temperatures caused some observers to call these the Spring Olympics.
Vancouver Organizing Committee officials said that while it wasn't the weather they expected when they won the bid for the games in 2003, it really wouldn't prevent the outdoor events from taking place.
During those first rough days, Canadian officials tried to reassure the nation and the world that the host country would do well on medals, and that they had planned for weather pitfalls.
With the Winter Games closing Sunday night, you could almost hear the voices of Canadian officials saying, "We told you everything would work out."
It was on the slopes of Whistler Creekside where two of the most compelling stories of these Winter Olympics unfolded.
One belonged to Lindsey Vonn, the U.S. skier who had dominated the World Cup. She was a medal favorite in four of the five Olympic events she entered, but on the eve of the games, she suffered a major shin injury. The weather delays gave her more time to heal. She won two medals, a gold in the downhill and a bronze in the Super G, but crashed in her other three events.
On the other end of the spectrum was former bad boy Bode Miller, who made more news partying at the 2006 Olympics than he did on the slopes. But 2010 will be remembered for how he redeemed himself by skiing to three medals, including a gold in the super combined. He became the most decorated U.S. Alpine skier in history.
Speed skater Apolo Anton Ohno also wrote himself into the U.S. medals record book with a silver in the 1,500 meters short track final, a bronze in the 1,000 meters and a bronze in the relay. With eight medals, he has won more medals than any other U.S. Winter Olympian in history.
Other athletes who impressed:
• Marit Bjoergen of Norway was the leading medal winner of the games, taking home five medals in cross-country skiing --- three gold, one silver and one bronze.
• Short track speed skater Wang Meng of China, who won three golds (1,000 meters, 1,500, relay).
• Norway's Ole Einar Bjoerndalen, who won his sixth career Winter Olympics gold, in the 4x7.5km cross-country skiing relay.
• Germany's Magdalena Neuner, who won two individual gold medals in biathlon, and then gave up her spot in the relay so a teammate would have a chance to medal;
• Slovenia's Petra Majdic, who won bronze in the women's sprint cross-country skiing race, despite racing through the heats with four broken ribs suffered in a training run.
The medals podium belonged to the United States, despite the "Own The Podium" program -- with its millions of dollars poured in by the Canadian government -- that the folks from the host nation bragged would make them the top team at the games. In the end, while they owned the top step, their neighbors borrowed the podium for 17 days.
The U.S. won a record 37 medals. The total included golds by the four-man bobsled team led by driver Steven Holcomb, the first gold medal ever by a skier in Nordic Combined (Bill Demong), and the expected brilliance of Shaun White in the snowboard halfpipe.
Despite a slow start and some disappointments in events that were supposed to be almost sure things, the Canadians won a record number of gold medals.
That number included men's hockey, beating the United States 3-2 in overtime -- a dream result for the host nation.
The games had started in the most awful, sobering way possible, with the news of the death of Georgian luger Nodar Kumaritashvili.
His fatal training accident called into question he safety of the track and spotlighted the fact that Canadian athletes had had far more training time on the tracks, slopes and facilities of these games.
Members of the British press blamed Kumaritashvili's death on the organizers' "lust for glory."
The criticism stung, but Canadian officials and fans were resilient.
If you don't know the words to "O Canada," you have not been in Vancouver these past two weeks.
It was being sung everywhere, in bars, on the streets, in arenas, even during low points such as Canada's loss to the United States by 5-3 in the men's hockey preliminary rounds.
And whoever makes Maple Leaf flags probably has already made a year or two's worth of profit.