In a routine but difficult spacewalk Monday, two astronauts fixed a crucial broken piece of the international space station, allowing it to be added on to later this year.

Space shuttle Discovery astronauts Piers Sellers and Michael Fossum replaced a cable reel to a rail car needed to move large pieces around the giant orbital outpost in a spacewalk dotted with glitches.

The reel, severed accidentally last year by a cable cutter, provides video, data and power to the rail car. The two immobilized the cutter in their first spacewalk Saturday.

NASA managers said fixing the cable reel was vital to space station construction, which will take 15 more shuttle flights.

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

"Whew, man, do I feel better," space station flight director Rick LaBrode told journalists after the spacewalk. "I tell you, I've spent the better part of the last three years of my life putting together this mission, and this particular (spacewalk) was my main concern.

"The obvious reasons are, one, it was extremely complex and challenging and, two, there are just huge implications to the continued station operations. So it was a big deal and to get it behind us successfully ... it's a great feeling."

The astronauts were just as relieved.

"The job worked out," Sellers said when he finally finished the difficult task of installing the broken reel in the shuttle's cargo bay. The reel didn't fit, so they twisted harder with a wrench until it was snug.

He was further delayed by a loose piece of spacewalking safety equipment that forced him to stay still until Fossum fixed it.

As he was getting back into the international space station's airlock, Sellers let out a long chuckle and said he went through "every contingency I hadn't thought of."

For his part, Fossum also had a hard time getting the new reel in place. But eventually everything fit, and the astronauts got all their tasks done. They just needed 12 minutes more than planned for their work.

Before fixing the cable reel, Fossum and Sellers breezed through the first part of their spacewalk, installing a spare external pump compartment on the station's cooling system.

That first part of the spacewalk went so smoothly that the duo — on their second of three spacewalks this mission — exchanged quips, jokes and even gibes at astronauts back in the shuttle.

Sellers came out of the hatch first, followed by Fossum, as the space station and Discovery passed about 220 miles above Spain.

"Everyone can hear you scream," said Fossum, in a twist on the tag line from the movie "Alien."

Sellers retorted: "About the time I get outside, I'll put on my alien costume."

At one point, the Discovery pilot radioed to Fossum, an accomplished Eagle Scout, and said that the Boy Scouts would be impressed, but that if he had botched his task they would have taken away his Eagle, a lifelong honor.

They would make Fossum "a sparrow," Sellers cracked, making up a nonexistent award.

When a cover for the pump module enveloped Fossum's head, he said, "I just threw a sheet over my head."

Then the duo turned their tongues at Discovery commander Steve Lindsey, teasing him for being overly caffeinated.

"Just keep him away from the chocolate-covered coffee beans; he's probably vibrating by now," Fossum said.

At one point Kelly told Sellers: "Enjoy the break; it's the last one you're going to get today."

That proved all too prescient.

The wisecracks turned to comments such as "This is a tricky place to work" from Sellers, and "We're getting a workout" from Fossum.

The one aspect the spacewalkers worried most about — a point at which Sellers held the old 330-pound cable reel in one hand and the new one in the other hand — went without a hitch.

The astronauts got welcome news Sunday when NASA managers cleared Discovery's thermal protective skin as safe for a return to Earth on July 17. Hundreds of images of Discovery were taken during liftoff, during the orbital flight to the space station and before docking with the complex to make sure the shuttle doesn't have any damage like the kind that doomed Columbia's seven astronauts in 2003.