This week's spectacle over the leadership of the FBI got all the headlines, but there's always a lot more taking place beneath the surface in the shadowy world of the intelligence community, or "IC."

Acting FBI Director Andrew McCabe was only one of a full slate of witnesses who appeared Thursday before the Senate Intelligence Committee to discuss the range of worldwide threats arrayed against the United States.

The bad news is: There's a lot of them.

Director of National Intelligence Dan Coats listed item after item in page after page of his opening statement, ranging from the threat of artificially intelligent technologies being compromised by cyberattacks to the danger from counter-space weapons launched against American satellites to the risks involved with the spread of Zika.

"The complexity of the threat environment is ever expanding," Coats said. "This has challenged the IC to stay ahead of the adversary and it has not been an easy task."

And there's more going on in America's spy agencies beyond the tracking of "threats" or their other tasks overseas. There are important storylines about the way they work inside Washington and even inside the Capitol itself. Here's a look at some of the biggest.

Kim Jong Un Is An 'Existential' Threat To U.S.

In terms of foreign dangers to the United States, Coats and his fellow spymasters were clear that North Korea tops the list.

"This is a very significant, potentially existential threat to the United States that has to be addressed," Coats said.

Scientists loyal to North Korean strongman Kim Jong Un are making progress in miniaturizing nuclear warheads that could fit atop potential new ballistic missiles with enough range to hit the United States, the intelligence bosses warned — although under questioning from Sen. Dianne Feinstein, D-Calif., they stopped short of revealing precisely when they believe that could happen.

"What we've not seen them do is do a complete end-to-end test of an [intercontinental ballistic missile] with a nuclear device," said Lt. Gen. Vincent Stewart, head of the military-focused Defense Intelligence Agency.

Even so, he said, "they're going to put those two together at some point ... they're on that path and they're committed to doing that."

CIA Director Mike Pompeo told senators that his agency was working more closely with South Korea, a treaty ally that hosts some 30,000 American troops and their families, to try to step up the work to slow down or put pressure on the North.

But Robert Cardillo, director of the spy satellite and mapping-focused National Geospatial-Intelligence Agency, suggested that the competition with the North might wind up close to a photo finish.

"They are in a race," he said. "[Kim] is pushing very hard on the accelerator here. This whole panel is well aware of that and we are doing everything in our power to make sure that we give you and our customers the advantage to win that race."

Dial 702 For Snooping

Washington's intelligence bosses weren't just reporting in on Thursday. They also were on Capitol Hill to do a bit of lobbying for a favorite bill — known in the IC as Section 702 — that authorizes them to monitor some Americans' communications without a warrant.

Traditionally it took permission from a judge before American spies could surveil a "U.S. Person," but since 2008, Congress has permitted such monitoring to continue if an American communicates with a foreigner overseas who is already a target of lawful intelligence-gathering.

The spy agencies are supposed to "minimize" details about people swept up in what they call such "incidental collection," and they say their practices are regularly vetted by Congress and the Foreign Intelligence Surveillance Court.

This year's imbroglio over the firing of former national security adviser Michael Flynn has brought a spotlight back on these practices, even if conversations between Flynn and Russian Ambassador Sergey Kislyak might not have been intercepted under this provision in the law. So as elements of the Foreign Intelligence Surveillance Amendments Act are due to sunset this year, critics in both parties want to use the threat of holding it up to get concessions.

Republicans say the leaking of details about Flynn and Kislyak show how easy it is for national security officials to abuse their powers — then-national security adviser Susan Rice, it has emerged, asked for the names of President Trump's associates to be "unmasked" as she reviewed intelligence collected before the inauguration. At about the same time, someone gave The Washington Post details about Flynn's conversation even though his identity and those details are supposed to be a closely guarded secret.

Rice has denied that she did anything wrong or that she leaked classified information.

Meanwhile key civil libertarians, including both Republicans and Democrats, argue there's nothing "incidental" about incidental collection — that the U.S. government is probably snooping on millions of innocent Americans talking lawfully with people overseas.

Sen. Ron Wyden, D-Ore., on Thursday renewed a demand that Coats provide a public estimate of the people involved with this "incidental collection" — one he said the intelligence community has been stonewalling for years.

"We have to have that number," Wyden said. "Are we going to get it? Are we going to get it in time so we can have a debate that shows that those of us who understand there are threats coming from overseas, and we support the effort to deal with those threats as part of 702? That we are not going to have American's privacy rights indiscriminately swept up?"

Coats promised he would respond but said the issue is technically complicated and investigating it might involve an active breach of Americans' privacy. He and National Security Agency Director Mike Rogers insisted that no matter how the debate in Congress goes, they must continue to have Section 702.

"If we were to lose 702's authorities, we would be significantly degraded in our ability to provide timely warning and insight as to what terrorist actors, nation states, criminal elements are doing that is of concern to our nation as well as our friends and allies," he said.

What's more, Rogers added, much of what the intelligence community learned about last year's Russian meddling in the presidential election "was informed by knowledge we gained through" that power.

The Kaspersky Conundrum

The cyber-frustrations of members of Congress and their witnesses are a frequent feature of Intelligence and Armed Services Committee hearings and other national security hearings on the Hill. They seldom, however, get more specific than broad statements and almost never involve the name of a specific problem or company. On Thursday, however, two senators mentioned one in particular: Kaspersky Labs.

The Russian company — which supports NPR and is a provider of security services for its IT systems — has been linked to work for Russia's intelligence agencies. The leaders of the House Oversight Committee released documents showing payments by Kaspersky to Flynn. Even so, millions of Americans use Kaspersky software, as Sen. Marco Rubio, R-Fla., pointed out to the witnesses — but, he asked, would they run it on their systems?

Here's how they answered:

McCabe, of the FBI: "A resounding no from me."

Pompeo, of the CIA: "No."

Coats, the director of national intelligence: "No, senator."

Rogers, of the NSA: "No, sir."

Stewart, of the Pentagon's DIA: "No, senator."

Cardillo, of the National Geospatial-Intelligence Agency: "No, sir."

Later, Sen. Joe Manchin, D-W.Va., asked the intelligence bosses about Kaspersky again. They repeated their own government systems were safe from any danger, but the DIA's Stewart said he couldn't be sure about all of his contractors. Intelligence and defense contractors have been the sources for huge leaks of secrets from the NSA, CIA and other agencies.

Coats Takes Control

Intelligence officers often lament that their greatest exploits may never be known but their worst failures are often front-page headlines. The CIA, FBI and NSA especially have been in a constant state of reinvention since the Sept. 11 terrorist attacks, then the botched case for Iraqi weapons of mass destruction and the exposure of many secrets by former contractor Edward Snowden.

Congress and the intelligence agencies have tried after each of these and other big defeats to remake themselves; one result was the creation of Coats' job trying to herd the cats of the 16 other entities that make up what insiders call "the IC."

There's been tension between the community and President Trump since before his inauguration, when he has both accepted and rejected its conclusion that Russia meddled in the election that put him into office. And Trump later infuriated many CIA officers by using the agency's memorial wall as the backdrop for an early post-inauguration stump speech.

So between the never-finished work of remaking and reshaping the IC and Trump's personal animus after the election, it appeared he might set to work early with a wrecking ball: The New York Times reported in February that Trump planned to bring in billionaire Stephen Feinberg to do an outside review of the intelligence agencies, something that chilled insiders and irked Coats, who had not yet been confirmed.

Since then, however, the situation has gotten better, Coats told senators. He and his agency leaders are frequent guests for long meetings at the White House with Trump, he said. And although there will still be another big review of the IC at the 10-year mark since the big post-Iraq reforms, Coats said he will be driving the train.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.