A new federal aid package designed to provide economic relief to businesses still immobilized by the coronavirus just passed in the Senate.

The $484 billion in total aid passed after two weeks of negotiations between Republicans, who wanted to press additional small business funding forward without much reevaluation, and Democrats, who were eventually able to secure additional relief measures beyond the small business funding at the heart of the bill.

The focal point of the new legislation is the $310 billion it will allocate to the Paycheck Protection Program, a key feature of the first relief package. That program was beset by problems from the outset, with a huge portion of small business owners failing to secure the forgivable loans through banks even with prompt applications in the program’s earliest moments.

Within a few days of going live, it became clear the application process was plagued by issues, and its massive $349 billion pool of funds had already dried up. Some small business owners also reported that they couldn’t find a bank to accept their application, as some banks prioritized existing customers.

Among those issues: Some of the money was sucked dry by entities that a program for small businesses probably shouldn’t be helping out to begin with. Remarkably, even hedge funds, major restaurant chains and Harvard University cashed in on the loans under the existing terms, while most owners of actually small businesses were left high and dry.

Companies with fewer than 500 employees were eligible for the loans, which become forgivable if the money is put toward payroll by hiring back or retaining employees. The maximum loan under the PPP is 2.5 times a company’s average monthly payroll, up to $10 million.

Out of the new $321 billion, $60 billion will go to smaller lenders and credit unions that can provide loans to small businesses that might not bank with major financial institutions. Other measures Democrats secured in the new legislation include an additional $75 billion for hospitals and $25 billion for a national COVID-19 testing strategy, funding that comes with a requirement that the Trump administration form a “strategic plan” for helping states with testing.

The interim bill does not include any funding for a vote by mail system — federal funds that some Democratic lawmakers and a bipartisan group of state election officials view as essential for conducting safe voting this fall. Additional funding to help adapt and administer the 2020 election is likely to be a big talking point in the next wave of relief legislation.

The latest relief bill, which President Trump has signaled he will sign, will now move to the House, where it is expected to pass on Thursday.