It pays to own up to your mistakes. In early 2017, McDonald's (MCD 0.38%) executives admitted they had fallen short of diners' expectations around quality, convenience, and value. Following three straight years of declining customer traffic, the fast-food chain was finally fixing those issues, management said, so they could "win back some of McDonald's best customers."

That rebound strategy is working. Customer traffic inched higher in the first quarter of 2017, and then accelerated in each of the next two quarters.

Five young adults eating fast food.

Image source: Getty Images.

As a result, McDonald's comparable-store sales are up 6% over the past nine months compared to Yum Brands' (YUM 0.03%) 2% increase and Shake Shack's (SHAK 0.34%) slight decrease. Sure, it's early to call it a full comeback, but McDonald's is making progress at recapturing its industry leadership position.

Still, investors should be more excited about the chain's improving finances. These numbers point to rising profitability and increasing cash returns -- even if McDonald's operating rebound stalls.

Soaking up franchise fees

About 4,000 of McDonald's restaurants were "refranchised" over the past two years, meaning they were sold to independent franchisees. This move is part of a long-term plan to lower the proportion of company-owned locations down to 5% from 15% back in 2015. McDonald's originally had expected the process to take three years, but executives met that target a full year ahead of schedule.

Refranchising pinches revenue since it replaces (higher) food sales with (lower) franchise fees, royalties, and rent. However, these franchise-based revenue streams are much more profitable, and they're lifting McDonald's profit margin at the expense of a weaker top line. The effect has been dramatic so far, where sales over the last nine months are down 6%, while operating income is up 29%.

McDonald's is also cutting expenses and is on pace to save $500 million in annual costs. The combination of these favorable financial shifts has pushed operating margin up to 38% of sales compared to 28% in 2015.

MCD Operating Margin (TTM) Chart

MCD Operating Margin (TTM) data by YCharts.

There's more improvement on the way. McDonald's is targeting operating margin in the mid-40% range by 2019, which is more than double the best profitability that Chipotle (and its 100% company-owned store footprint) managed, even before the food-safety scare disrupted its business.

More cash on the way

McDonald's will direct a big chunk of this extra cash toward initiatives aimed at extending the leadership position it recently recaptured. Big global projects, like online ordering and home delivery, won't be cheap, after all. The company also plans to stuff new technology into its restaurants to speed up the ordering process.

These investment priorities are a key reason why McDonald's is scaling back slightly on its cash-return plans by promising to send $8 billion to shareholders per year through 2019, down from a $10 billion annual pace in 2013 through 2016.

The delivery initiative might open up space on the chain's menu for new food categories that widen its addressable market. That's the same reason why a wide range of companies, from fast food specialists to grocery store chains like Kroger, are attacking the delivery space.

McDonald's is already far more profitable than most of these food retailers. And the good news for investors is that, whatever initiatives CEO Steve Easterbrook and his team decide to pursue, the company's improving finances should support a rising dividend -- which jumped by 7% in 2017 -- and increasing share-repurchase spending over the long term.