Palm oil is in everything, from pizza dough and chocolate to laundry detergent and lipstick. Nongovernmental organizations blame it for contributing to assorted evils, from global warming to human rights abuses.

But in the past year, this complex global industry has changed, as consumers put pressure on producers to show that they're not destroying forests, killing rare animals, grabbing land or exploiting workers.

I was somewhat astonished to discover, on a trip to a palm oil plantation in the province of North Sumatra, Indonesia, that this much-maligned commodity actually begins with an innocuous-looking, beautiful creation of nature. Palm fruit is composed of ovoid kernels, which, when ripe, shine with lustrous hues of crimson toward their tips, orange in the middle and yellow at their stems.

The kernels are clustered in a bunch that can weigh more than 50 pounds.

It was an absorbing tactile experience to break open a kernel and get its oil on my fingers. It has a yellow color and a smooth consistency that can only be described as buttery.

To see how palm fruit is harvested, I followed a young worker named Sugiarto, who uses only one name, as he made his rounds through the eerily uniform rows of trees on the plantation.

Sugiarto raised a scythe-like blade on a long pole up toward the top of the tree. He cut away the bottom-most branches, and then the stem of the fruit, which brought the fruit bunch tumbling to the ground with a heavy thud.

He then lopped off the stems with a machete and placed the fruit bunches by the roadside.

Trucks collect the fruit and take it to mills to extract crude palm oil.

In the past year, many big palm oil producers have made pledges of sustainability. One of them is the Minnesota-based multinational Cargill. John Hartmann is the Singapore-based CEO of Cargill Tropical Palm.

"There's just this realization that, to provide ... safe, nutritious food for the world, agriculture has to make some changes," he says. "And those changes include ... commitments to sustainability."

The vast global supply chain that connects the plantations of Sumatra to, say, that box of cookies in your pantry, can be complex and murky. Cargill, like many other big palm oil traders, gets 40 percent of its palm oil from small-scale farmers.

Asked whether he knows where all his firm's palm oil is coming from, and that all of it is produced sustainably, Hartmann says that Cargill keeps complete records on the smallholders' production. "All of the crop ... that we get, every ton, we know where it came from," he insists.

Cargill is also a member of an industry group called the Roundtable on Sustainable Palm Oil, or RSPO. The RSPO examines palm oil companies, making sure that producers are transparent, that they obey laws, protect endangered species and respect the land and labor rights of local residents, among other things. If the product meets their standards they put their logo on it and certify it as sustainable.

The RSPO's director in Jakarta, Dewi Kusumadewi, points out that palm trees take less land to produce a ton of oil than any other comparable crop, such as soy or canola.

"If we boycott palm oil, or if we do not want to use palm oil," she argues, "then the consumer good manufacturers will have to find other vegetable oils. How do we make sure these other vegetable oils are more sustainable than palm oil?"

Membership in the RSPO is voluntary, and Desi admits that it's still an imperfect system. Last year, the RSPO certified about a fifth of the nearly 30 million tons of crude palm oil produced in Indonesia — the world's largest producer. Along with Malaysia, the country accounts for nearly 90 percent of the world's supply.

The changes in palm oil production are squeezing smallholders. As the government protects more forests from being cleared to plant palm oil, the only way farmers can be profitable is to increase productivity. That requires investments of capital and technology.

Meanwhile, environmentalists are not only fighting to stop deforestation caused by illegal palm oil, in some places they're actually reversing it.

On a hillside in Sumatra's Aceh province, activist Rudi Putra and his team are bringing down an illegal palm oil plantation, one tree at a time. Putra sued two of the plantation's owners for clearing land without a permit from the government and won.

He says he'll give some of the land back to local communities. As for the rest, he says nature will heal itself. The forest will grow back, and in a couple of years, he says, Sumatran tigers, orangutans and elephants will return.

"It gives me tremendous satisfaction because this plainly shows that we can triumph over illegal plantations," he says.

This victory took nine years to achieve. Last year, Putra won the Goldman Environmental Prize for it.

But he says he's only just begun. This patch of land is only 1 percent of the nearly 1 million acres of palm oil plantations he plans to reclaim, on behalf of the local people and the wildlife.

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