Brazilian authorizes might feel a bit bewildered about all of the protests in their country.

After all, conditions for Brazil’s poor have vastly improved over the past decade. Per capita income has more than tripled, rates of poverty have declined, and average life expectancy has risen.

In Rio de Janeiro, one of the things the protesters are most angry about is the city’s plans to clean up its slums — or favelas — ahead of next year’s World Cup and the Olympics in 2016. Part of the plan involves evicting long-time squatters, who often have no place else to go. But there is a good side to the plan, for some residents it’s meant a vast improvement in their living conditions.

If Copacabana is the good life in Rio — postcard beaches, seaside cafes, bars and nightclubs — Babilonia is a different world. Venture up into the hills just a few blocks away from Copacabana on a steep, curvy road, and you’ll arrive in one of the city’s oldest favelas.

Perhaps 3,000 people live in Babilonia. Their homes, built into the steep hillside, look like they could fall into the ocean at any moment. Mudslides are a problem in Rio’s favelas, as is inadequate sewage and a culture of drug violence. Two years ago, though, the city began revitalizing Babilonia.

City engineer Mauricio Tostes, who is in charge of the Babilonia project, led a walking tour through the neighborhood and pointed to a new playground where children were playing in the center of town. Speaking through an interpreter, he said this area had been used as an impromptu garbage dump.

The city is putting in a community center and proper sewage. Babilonia is also an experimental “green favela,” with vegetation being added to help prevent mudslides and beautify the neighborhood. Locals are being hired as gardeners.

Tostes is also tearing down unstable houses. The city compensates the displaced homeowners, relocates them to newly-built apartments or moves them to another community entirely. It’s up to them to choose.

Tostes looked at a home clinging to the hillside. He’s ripping it down to expand a road that can accommodate cars and trucks. Currently, only motorcycles can fit through.

It’s all part of an overall plan, called Morar Carioca, (a Carioca is a native resident of Rio) to integrate Rio’s favelas with the rest of the city.

But before the engineers can come in and do their work, the police arrive. The state of Rio de Janeiro sends in “pacifying units.” They announce they’re coming a few days beforehand, so the drug dealers move out. This helps prevent a showdown.

That’s how it worked in Babilonia. Carlos Antonio Pereira, the president of the community, said the security has given people in the community dignified living conditions. Speaking through an interpreter, he said they were abandoned here for many years. Then the government had the courage to come in and do something.

A few cops with big guns have also remained behind.

John Carlos, a youth soccer coach, said the police are welcome here. He was hanging out at the town barbershop — three stools and a mirror on the side of a road. In Portuguese, he said the changes in Babilonia are excellent. Kids can play on the streets until late at night now and don’t have to worry about stray bullets.

Not everyone seems as satisfied with all the changes though.

Walking through the community, one woman confronted Tostes. The woman was saying her son has the rights to the land that Tostes had cleared to make room for the service road. Tostes told her to take it up with the mayor’s office.

Tostes said this happens a lot.

But he shrugged and said the mayor’s office has already paid the family to relocate; now the woman just wants more money.

Tostes later joked that half the people here love him, and half hate him.

Bruno Souza Santos is in the second group. He lives in a favela northwest of the city. He says his community is suffering because of the improvements in places like Babilonia.

He said when the police announce they’re moving in, the drug lords pick up and move down the road to other places, places like his favela.

In the next breath, though, he said he’d welcome the police in his neighborhood too. They haven’t arrived yet.

Back in Babilonia, 74-year-old Zilda Da Cunha Martins loves the changes she’s seen. She just moved into a new, two-bedroom apartment with reliable running water for the first time in her life.

“I’m very, very, very happy,” she said. She said she used to live in a big house, a good house, but it was falling apart and they couldn’t afford to repair it. When this chance came up, she said, “As they say in Portuguese, we hugged the opportunity.”

About 1.4 million people live in Rio’s favelas according to city estimates. The city of Rio has set a goal of revitalizing all of the favelas by the year 2020.

But given the current unrest, they might need to speed up their efforts.