During a wide-ranging interview Tuesday on "The Tonight Show with Jay Leno," President Obama defended the National Security Agency’s (NSA) surveillance programs, arguing that the agency doesn’t target U.S. civilians.

“We don’t have a domestic spying program,” Obama said,“What we do have is some mechanisms that can track a phone number or an email address that is connected to a terrorist attack. That information is useful.”

The President called the surveillance programs “a critical component to counter-terrorism,” but acknowledged that they’ve “raised a lot of questions for people.”

Obama also touched on the U.S. embassy closures, and the global travel alert, and you can view that portion of the program here. The State Department extended the closure of 19 diplomatic posts in the Middle East and Northern Africa through next weekend. The president said U.S. officials were not overreacting to the potential terror threat.

Here, the discussion covers Vladimir Putin and attending the G20 summit. Obama said he was still planning on attending the G20 in St. Petersburg, despite calls for him to withdraw from several lawmakers.

Obama told Leno that he was disappointed with the Russian government’s decision to grant Edward Snowden asylum, but pointed to areas of recent cooperation, like the Boston Marathon bombing investigation, as evidence the countries can still cooperate on important issues.

Jay Leno also brought up the recent crackdown on gays in Russia, comparing the country’s treatment of homosexuality to the way Nazi Germany persecuted Jews. Obama said that he has "no patience for countries that try to treat gays and lesbians and transgendered persons in ways that intimidate them or are harmful to them."

However, he also said that he doesn't think it would impact the Olympics next year in Russia.

"I think Putin and Russia have a big stake in making sure the Olympics work," he said. “I think they understand that for most of the countries that participate in the Olympics, we wouldn't tolerate gays and lesbians being treated differently."

President Obama touches on boosting the middle class and fixing our infrastructure here.

The discussion also covers "bromance" with John McCain, lunch with Hillary Clinton, and Obamacare. Leno jokingly asked if Clinton measured the drapes while she was at the White House last week.

“Keep in mind she’s been there before,” Obama reminded Leno. “She doesn’t have to measure them.”

Addressing the benefits of his signature healthcare legislation, the president said that “People are going to be able to sign up for health care if they don’t have health care,” the president said. “If you do have health care, you don’t have to do anything, the only thing that has happened for people who have health care right now is you’re able to benefit from the fact that we put in place a law so insurance companies will have to spend 80% of your premiums on healthcare.”

"Here in California it’s estimated it will be 20-30% cheaper than what you’re already getting and we’ll give you subsidies, tax credits essentially, if you still can’t afford it. So you can go to healthcare.gov and right now you can start pre-registering, essentially, and start figuring out ‘is this plan right for you?”

Leno told the president he’d spoken eloquently about the death of Trayvon Martin. “I could tell you were speaking from the heart,” he said. “Tell me about that.”

He told Leno that he spoke about the case because he “wanted to try to explain why this was a particularly sensitive topic for African-American families because a lot of people who have sons know the experience they had of being followed and being viewed suspiciously… We all know young African-American men disproportionately have involvement in criminal activities and violence for a lot of reasons…. And that’s no excuse but what we also believe in is people, everybody, should be treated fairly and the system should work for everyone. And so what I’m trying to do is just make sure that we have a conversation and that were all asking ourselves ‘are there some things we can do to foster better understanding’ and to make sure we don’t have laws in place that encourage the kind of violent encounter that we saw there that resulted in tragedy.”

Tuesday’s visit to The Tonight Show With Jay Leno was Obama’s sixth appearance on the program, and his fourth as president. Obama’s March 19, 2009 appearance on The Tonight Show was an unprecedented move–it marked the first time a sitting president appeared on a late-night talk show