Updated

The space shuttle Endeavour and its crew of seven have left the international space station.

The space shuttle undocked from the space station Friday morning. It is ending a 12-day visit that left the orbiting complex with more modern and deluxe living quarters.

Space station skipper Mike Fincke has thanked the shuttle astronauts for "the extreme home makeover." The space station now has almost everything it needs to accommodate a bigger crew next year. That includes an extra bathroom, kitchen and bedrooms, and a new recycling system that can turn urine and sweat into drinking water.

• Click here for more photos.

• Click here to watch live NASA TV feed of the mission.

• Click here to visit FOXNews.com's Space Center.

The shuttle's crew is set to return to Florida on Sunday after completing a 16-day mission to deliver supplies so that the space station's population can double — to six — next year.

Endeavour astronauts also performed four spacewalks to clean and lubricate a jammed joint that rotates solar wings toward the sun to generate power.

"You've totally fixed us up on the inside and on the outside," station commander Mike Fincke told Endeavour's crew before the hatches between the station and shuttle shut Thursday evening. "You guys were such perfect guests. You left the place cleaner than you found it."

The shuttle will bring back Gregory Chamitoff, who lived for six months at the space station. Astronaut Sandra Magnus took his place on the three-person crew after arriving Nov. 16 aboard Endeavour. The station's other crew members are Fincke and Russian cosmonaut Yuri Lonchakov.

"As I leave it today, I feel both happy and sad," Chamitoff said Thursday evening. "Sad to leave my crew. ... And of course I'm really happy because I'm really looking forward to seeing my family."

Before the hatches closed and the astronauts exchanged farewell hugs, the two crews ate a Thanksgiving meal together of smoked turkey, candied yams, green beans and cornbread dressing.

Flight controllers in Mission Control also got into the Thanksgiving spirit. They ate Thanksgiving dinners at their consoles and displayed an animated turkey on the center's gigantic electronic map, which tracks the space station's orbit around the world.

In the afternoon, flight controllers lined up in Mission Control, each holding a sign with a letter spelling "Happy Thanksgiving" for the space shuttle crew, as the song "Grease" played over loudspeakers as a tribute to the grease-gun-carrying spacewalkers.

Endeavour astronaut Donald Pettit, who lived for five months at a smaller version of the space station six years ago, said the outpost has become grander with each new addition.

"It's like coming back to visit your parents and finding out they put a new addition onto the house," Pettit said.

Among the home improvement items delivered 1 1/2 weeks ago: a bathroom, kitchenette, two bedrooms, exercise equipment and a system for converting astronauts' urine and sweat into drinking water. All is needed to double the space station's population next year to six.

Working from inside, the astronauts grabbed onto the canister with the robot arm to lift it from the orbiting outpost for placement back aboard the shuttle. The container was loaded with nearly 2 tons of discarded equipment, trash and completed science experiments.

At Mission Control's request, the astronauts had left space in the crate for the urine-recycling machine, in case it broke again and needed to be brought back.

Thanks to the astronauts' tinkering, however, the processor continued to work fine, churning out plenty of samples to be brought back.

NASA wants to test the samples and run the equipment in orbit for at least three months before allowing anyone to drink the recycled stuff.

"Now we're not going to be drinking this today," shuttle commander Christopher Ferguson said, holding up the first batch of processed urine.

The astronauts laughed and described the process as turning "yesterday's coffee into today's coffee," and labeled a few bags as such.

In all, about seven liters of recycled urine and condensation will be returned. It will take at least a few weeks to analyze it, said flight director Holly Ridings.

On Thursday, the seven shuttle astronauts and three station residents gathered to share Thanksgiving turkey dinners and other holiday goodies at midday, before saying goodbye and closing the doors between their spacecraft. All but one is American.

It was the last meal aboard the space station for Gregory Chamitoff, who's leaving after a six-month stay. Sandra Magnus replaced him; she'll spend 3 1/2 months up there.

Mission Control gave both crews the morning off Thursday so they could enjoy the holiday together.

NASA added a 16th day to the flight to give the astronauts extra time to work on the balky urine processor.

A little before touchdown, a Russian unmanned cargo ship is scheduled to arrive at the space station, bearing Christmas presents, clothes, food, water and other supplies. The cargo ship blasted off from Kazakhstan on Wednesday.