Pretty good news on the surveillance front: on Wednesday the House of Representatives overwhelmingly passed the USA Freedom Act of 2015, which reauthorizes and reforms key measures of the Patriot Act to effectively end the bulk collection of Americans’ phone records.

I say pretty good, because while this bill is almost certainly the strongest reform bill to pass either legislative body since 2013’s surveillance revelations—limiting intelligence agencies’ ability to collect metadata en masse and increasing transparency on the government’s secret Foreign Intelligence Surveillance Court (FISC)—it is by no means the strongest bill considered nor voted on. (The Senate’s 2014 version of USA Freedom, narrowly defeated in November, was stronger on several counts.)

Indeed, some major civil libertarian groups, including ACLU, Fight for the Future, and Demand Progress (where, full disclosure, I used to work), withheld support for the bill. They’d prefer to see Patriot Act Section 215—the legal statute under which the government claims authority to collect Americans’ phone records—expire on its June 1 sunset date.

Now the focus moves to the Senate, where a fight is brewing among the bill’s bipartisan supporters, libertarians in both parties who want stronger reforms, and a small group of conservative hawks, lead by Majority Leader Mitch McConnell, who would prefer to reauthorize the Patriot Act without reining in the NSA at all. It should be a good time.

Ahead of that dust-up, let me give a quick rundown of the good, the bad, and the ugly (and there is some ugly) in the USA Freedom Act as passed by the House on Wednesday.

The Good

At the very least, the vote—338 yays to 88 nays—is further vindication of former NSA contractor Edward Snowden, who disclosed the bulk surveillance program to Glenn Greenwald and TCF’s own Barton Gellman in 2013.

As with the Second Circuit’s ruling last week—that the NSA’s metadata collection program is illegal—the House’s vote demonstrates that Snowden sparked a conversation we desperately needed to have. As Greenwald put it, the bill’s passage is the “first time since 9/11 that powers justified in the name of terrorism will be reduced rather than increased.”

Assuming the bill makes it through the Senate, that may very well be the case. The bill ends bulk (and most “bulky”) collection by requiring the federal government to limit its requests for call data to a “specific selection term”—an individual, account, address, or personal device. The government could no longer request, for example, all metadata for Verizon customers or for inhabitants of Missouri.

The bill also allows companies to report, in greater detail, on the surveillance orders they receive from the federal government and requires the government to estimate the number of “unique identifiers” collected under such orders.

And finally, the bill calls for some reforms to the Foreign Intelligence Surveillance Court, which adjudicates government requests for surveillance data. The bill requires the FISC to disclose significant opinions—including those that entail new interpretations of “specific selection term”—and allows the court to appoint an amicus curiae (or friend of the court) in cases involving a “novel or significant interpretation of the law.”

While far from providing an actual adversarial counterweight to the government in FISC proceedings—as Second Circuit Justice Robert D. Sack advocated in his concurring opinion last week—an amicus empowered to advance (if she so chooses) “legal arguments that advance the protection of individual privacy and civil liberties” is a good step for a court that’s been widely condemned as overly compliant to the government’s wishes.

The Bad

The bad news is, it’s not all clear that the above will substantially limit the government’s ability to collect most of what it wants to.

First, the definition of “specific selection term” for “tangible things” other than call detail records is much less specific. In such cases, the term can be “a person, account, address, personal device, or any other specific identifier” provided it is as limited as “reasonably practicable.” That definition does not preclude the government from targeting an IP address serving many people, interpreting person to include a corporate person, or engaging in other hermeneutic wiggliness with the words specific identifier. Moreover, the bill allows the government to collect a “second hop” of call records—metadata on people in contact with those identified under the first selection term—without additional authorization.

There is also the question of how the Second Circuit’s ruling impacts the USA Freedom Act. The Second Circuit’s opinion was based in large part on a limited definition of the word relevant. That is, all the phone records of every American cannot be considered “relevant to to an authorized investigation” simply because—as the FISC had interpreted the statute—they might be at some point later on.

In the worst-case scenario, the USA Freedom Act could be interpreted as ratifying the FISC’s definition of relevant rather than upholding the Second Circuit’s. Electronic Frontier Foundation (EFF)—who withdrew support for the bill after the Second Circuit rulings—has suggested a simple solution to this problem: include the Second Circuit’s definition of the terms relevant and investigation in the Senate version of the bill or in its legislative history.

Another issue is the bill’s “minimization procedures,” which only require the government to destroy call detail records that it determines are not foreign intelligence information. Last year’s Senate iteration of USA Freedom included more stringent procedures, requiring the destruction of data on individuals who are not targets of an investigation, suspected agents of a foreign power, contacts of same, or possessing knowledge of same.

Finally, the bill does not close what critics call the “backdoor search loophole” enabled by Section 702 of the Foreign Intelligence Surveillance Act (FISA). Section 702 authorizes the NSA to surveil non-U.S. persons in other countries. In the process of 702 surveillance, however, the agency “incidentally” sweeps up the communications of many Americans. As it stands, the government is not required to get a warrant to perform a search of that incidentally collected data. Most concerning, unlike the domestic phone records program, 702 authorizes the collection of content—actual e-mails, text messages, and phone calls.

Last summer, the House passed (293 to 123) an amendment to the Defense Appropriations Bill that would have outlawed warrantless “backdoor” searches of Americans’ communications. Any serious surveillance reform bill should do the same.

The Ugly

Finally, the bill includes a handful of “sweeteners” intended to appease hawks in the intelligence community. They’re ugly and unnecessary.

First, the bill increases the maximum sentence for “material support” of terrorism—a broad provision that has netted countless individuals and organizations with no intent to support terrorists—from fifteen years to twenty years. And second, the bill allows the government to conduct warrantless surveillance of a suspect targeted under FISA Section 702 for seventy-two hours after they enter the United States.

These measures have no business in a surveillance reform bill and should be cut from the Senate version.

The Rub

Many who recognize the USA Freedom Act’s shortcomings nonetheless welcome its passage as a step in the right direction. As Representative Jim Sensenbrenner, one of the bill’s major supporters in the House and one of the Patriot Act’s original authors, put it, “if [pursuit of] the perfect defeats the good, then bad prevails.”

By that token, reformers should stick together, embrace the Senate’s substantially similar bill, and work together to fend off McConnell’s gang of hawks.

On the other hand, civil libertarians have an uncommon advantage in this fight: if no bill passes by June 1, the intelligence community and its congressional backers automatically lose a handful of provisions they consider absolutely essential to their counterterrorism priorities.

The impending deadline puts pressure on the rest of Congress to pass something and quick. If the loose coalition of left and right groups that support stronger reforms—who were largely responsible for the 88 nays in the House—can mobilize allies in the Senate, they could be well positioned to demand a much better bill.

Think of it as the “USA Even More Freedom Act.”