(CNN)Five years ago, Detroit was America's poster city for urban decay.
The city had $18 billion of debt and fewer than half the number of residents it had in the 1980s. Abandoned homes dotted the landscape.
For those who remained, jobs were scarce. City services were so poor that police could take almost an hour to respond to emergency calls.
But the largest bankruptcy in US history allowed Detroit to start rebuilding.
It filed on July 18, 2013, and after 16 months in bankruptcy court, the city was allowed to shed roughly half of its debt. The state and a number of private foundations and companies — including Ford Motor, General Motors and Chrysler — chipped in millions of dollars to help fund public worker pension benefits.
The Motor City has received more than $250 million in federal aid used to remove blighted buildings. Since 2014, about 14,000 vacant houses have been demolished and thousands more have been boarded up or rehabilitated, city officials said.
Police response times to emergency calls are down to 12 minutes on average and 65,000 new street lights have been installed. After a seven-year absence, street sweepers are cleaning residential streets again.
The population exodus has slowed, and unemployment is down to 8% from 22% since the 2013.
Detroit continues to attract private investments. More than $4 billion has developed more than 300 commercial and residential projects over the past five years, city officials said.
"I have to say, I'm amazed at how good things have gone," said Eric Scorsone, associate professor and founding director of the Michigan State University Extension Center for Local Government Finance and Policy.
But by many measures, Detroit still has a long way to go.
About 36% of residents lived in poverty in 2016 and per capita income was less than $17,000, according to Census data provided to CNN by the Michigan Department of Technology, Management and Budget.
Many communities outside downtown are still empty.
"Now the big challenge economically and fiscally is the neighborhoods," Scorsone said.
Getting people to stay
The city prioritized addressing blight in neighborhoods where residents have stayed.
"We've been focused on improving things that Detroiters can see out their windows," said Arthur Jemison, who's been leading the city's housing and revitalization efforts since Mayor Mike Duggan took office in 2014.
Abandoned homes are now regularly torn down or boarded up and auctioned off.
The city brings lawsuits against owners who've neglected their properties, demanding that they renovate or lose their right to the land.
It also helps residents stay in their homes, too. A number of efforts are under way to stem foreclosures, like reaching out to low-income households that may be eligible for tax assistance. The city makes sure landlords are in compliance with rental rules. It sells empty side lots to neighbors and has renovated 40 neighborhood parks.
But the work is far from done.
"I think we are probably in the end of the beginning of addressing vacant buildings," Jemison said.
He expects Ford's investment in the Corktown neighborhood's to drive economic growth there. In June, the company bought the abandoned, iconic Michigan Central Station and plans to turn it into an innovation hub for its autonomous and electric vehicle businesses.
Future challenges
Earlier this year, after passing three balanced budgets in a row, Detroit exited state financial oversight. It was the first time in 40 years that no part of the city's finances was under state authority.
But the city could face bigger-than expected pension costs in 2024, when it is required to start contributing again. (Contributions have mostly been covered by third parties since the bankruptcy.)
"My biggest concern going forward is the pension liabilities. By all accounts, actuaries underestimated the problem coming out of bankruptcy and a year later, determined it actually got a lot worse," said Scorsone, who who also served as deputy state treasurer for about two years.
The good news, he said, is that Mayor Duggan's administration recognized the problem and began setting aside money for the pension funds already.
But overall, Scorsone believes the city is in a much better position to handle future challenges than it was in 2013.
"The city has made huge progress and is in a much better financial situation," he said.