Congress passed a 10-year, $867 billion farm bill Wednesday that would reauthorize a variety of agricultural programs and food aid for low-income Americans.

Debate on the legislation took months, with funding for the food stamp program one of the major sticking points during negotiations. The Senate approved the bill on 87-13 vote Tuesday. The House passed the measure with a 369-47 vote Wednesday, sending the bill to President Donald Trump’s desk.

Here’s what is in the legislative package, which Trump is expected to sign next week:

Rejects limits to the Supplemental Nutrition Assistance Program, better know as food stamps. The bill final left out a proposal from House Republicans and the president to impose stricter work requirements that would have cut roughly 1.1 million households from the program, according to a 2018 study by Mathematica Policy Research. The program currently serves more than 40 million low-income Americans.

Expands the safety net for dairy farmers. The bill lowers insurance premiums in the dairy margin protection program, a risk management program authorized by the 2014 farm bill that protects farmers’ revenues when when production margins fall. The renewed support comes as the dairy industry faces a fourth year of depressed milk prices.

Legalizes the cultivation of industrial hemp. Senate Majority Leader Mitch McConnell, R-Ky., played a key role in negotiations to remove the crop from the federal list of controlled substances. The new classification will benefit McConnell’s home state of Kentucky, whose farmers are part of a growing hemp industry that’s predicted to expand into a $20 billion industry by 2022.

Extends forest management. The finalized bill did not include a proposal by House Republicans and the Trump administration to ease environmental rules to allow more logging and forest-thinning projects, something they argued could help prevent wildfires. But it does create a program to encourage utility companies to clear bush near power lines on federal land.

A host of other, lesser-known provisions also made it into the bill:

Permanent funding for veteran and minority farmers. The bill guarantees $435 million in permanent funding to educate military veterans, socially disadvantaged and beginner farmers by tripling the current budget of the Farming Opportunities Training and Outreach Program.

The bill provides other benefits for veterans as well, including decreasing the price of risk management tools, improving access to capital and land, and improving access to training.

Urban farming. The farm bill establishes a new office at the Department of Agriculture to advocate for and promote urban and indoor agriculture, such as community gardens, rooftop farms, and hydroponic and aquaponic farms. The office’s responsibilities also include helping identify best practices for navigating local urban farming policies and enhance existing business training programs for urban farmers.

Funding for organics. The bill permanently secures $50 million in annual funding for a Department of Agriculture research program that focuses on organic farming practices and expanding organic agriculture. It also offers funding to support farmers transitioning to organic production.

Scholarships at historically black colleges and universities. About $40 million in new funding will be allocated for new scholarships at 19 African-American land-grant universities for students to pursue careers in agricultural and food sciences.

The bill also provides $50 million for at least three “centers of excellence” based at HBCUs with specific areas of focus, including farming systems and emerging technologies.

Rural high-speed internet. Under the bill, funding for high-speed internet in rural communities will increase from $25 million to $350 million annually.

Funding for specialty crop farmers. The bill continues a number of research, disease control and grant programs fort specialty crop farmers (such as fruit, vegetable and tree nut producers.) It also provides $125 million in funding over five years for a new research program into citrus pests and diseases.