When Waitr (NASDAQ: WTRH) pre-announced its second quarter results, it looked like a starkly different company than it did at the beginning of 2020. But it wasn’t the new popularity of delivery during the COVID-19 pandemic that got the company back on track, it was tough decisions, thoughtful exploration and seeing what the core constituents really wanted out of the company, according to the company’s new leader.

Back in January, it seemed that incoming CEO Carl Grimstad was set to be another rotation in a revolving door of CEOs—he was the third chief executive in just two years. From the outside looking in, he didn’t seemingly have much to work with as the company was $291 million in the red and had just closed 60 markets and laid off scores of workers.

“We were over-staffed, we were paying a lot of our vendors incorrectly or too much, our service offering was mispriced, we had a driver model that could never work, and we had a dwindling cash position and a capital structure—meaning $120 million in debt in front of equity that had no value—and were coming off a very big negative EBITDA year,” said Grimstad, summing up the brutal position he found upon arrival. “To say the least, there were opportunities or problems everywhere to be fixed.”

Citing an example, he said there was a room with stacks and stacks of iPads, one from each restaurant in the 60 shuttered markets.

“All the data charges were still up and going on a good portion of those iPads that were shoved in a closet. So, there was really money to be saved everywhere. Every rock you turned over was opportunity. That was daunting, as well, but very fruitful,” Grimstad said. “The company really has some real value; it was a first mover in a number of these second- and third-tier markets. It continues to have the leadership position in 20-plus markets. Right now, we’re focused on cementing in those markets where it’s super hard to compete us out.”

The unlocking of that company looks impressive on paper. Get the full picture in our prior coverage. In short, earnings flipped from negative $14.9 million to $15 million, revenue was up by almost $9 million and the company was able to pay down $12 million in debt.

Grimstad said he worked every position in the company, talked with employees at every level and attempted to outline what made real value for the three key constituents of the company: restaurants, diners and drivers. He said those cohorts looked a lot like his former work in payment processing at iPayment, the company he cofounded and led until 2016. In essence, Waitr was a sort of integrated payment company, too, but instead of salesmen in the middle, it was 18,000 delivery drivers bridging the relationship with the 2.5 million diners.

What may have looked like “draconian moves” on the outside, Grimstad said were necessary to keep the company from bankruptcy.

“It was an arduous process, when you’re coming from the outside in, it’s difficult. You don’t know the history and you almost have to go line-by-line, but we didn’t have a lot of luxuries there, the company was on the trajectory to be bankrupt in the first quarter,” he added. “So, we had to do some things quickly, and we did them but ultimately having some experience in customer service and staffing levels did help. There’s no perfect blueprint when you come in from the outside and have to make some difficult decisions.”

There were three big changes at the core of the company, pegging delivery pricing and fees to industry standards, converting W-2 drivers to 1099 contractors and appointing key people to oversee key constituent concerns.

The first was a pretty simple task, it just had to be done in a less “haphazard” way, said Grimstad. He looked to the broader market, at the billion-dollar companies that have done the analysis on millions and millions of orders to right-size the price.

“There was no analysis in the past with how the service offering was priced. It’s all very similar, if you’ve studied it, at the end of the day the restaurant pays some sort of take rate, it’s between 20 to 30 percent these days, big chains pay less and smaller entities pay more—that’s true in every industry for any service offering—and the diner pays the delivery fee,” said Grimstad.

A logical look to be sure, and it’s proven effective for revenue. For that customer constituent, it wasn’t too much of a jump, as Grimstad said the changes didn’t noticeably affect order volume.

“It really didn’t, we weren’t getting out of our box. Most of the constituents were using other vendors, too,” said Grimstad. “We were in line with the pricing model, we weren’t over our skis.”

As for the W-2 drivers, it was something the company heralded early on, as did Bite Squad, the Minneapolis-based company Waitr acquired at the tail end of 2018. But as Grimstad explained, the math was deceptively simple.

“On a whiteboard if you looked at it mathematically, someone would argue the W-2 model, if you’re giving a driver a certain amount of orders an hour, it would behoove you to use that model. That math does add [up], but when you dig into the details and it comes to Waitr and Bite Squad, we could never get to that level of efficiency. So, on an order-by-order basis, the profit margin would be all over the board or nonexistent depending on the efficiency of the drivers,” said Grimstad. “Then it was talking to drivers, the ones that really wanted to work, hated the W-2 model, their hours were limited, the company was afraid of overtime, so there was infighting for the best times and then there was a subset of drivers that went to matinees instead of delivering food.”

He brought the restaurant constituency into the mix as well, asking if they valued having W-2 drivers enough to pay more for them, and “not one restaurant said it’s the greatest thing and I’d pay more,” said Grimstad.

The switch was a fundamental one. He said it turned a fixed cost into a variable cost. That’s something a lot of companies would love to do if they could. He said it takes the risk off the company books.

“In times of very high volume, we have to incentivize divers and our margins get squeezed, but we know what it is going into it. It’s not every day looking to see if we were making money,” said Grimstad, adding that the unicorns in the space helped chart the course. “All these guys are 1099, in all their markets. There’s a reason, someone smart has really looked at this.”

The final big change was bringing in new key people. Grimstad brought in two from his iPayment days. First was Mark D’Ambrosio to lead the sales team and bring more restaurant constituents into the company, something the company had not prioritized as of late. Second was David Cronin to lead HR duties as the chief engagement officer and oversee the driver network. Lastly, there was Thomas Pritchard, a new general counsel to oversee the legal side of the business and potentially put his M&A background to work.

Grimstad said there is a lot more potential in the future, from in-app advertising and overall expansion, but consolidation is a big potential. He stopped short of saying the company is for sale, but said the company now looks like a more valuable asset.

“Consolidation has boded well in Europe and Asia and I think it started in a big way here—maybe a bit quicker than I thought. That being said, we can’t control that outcome in our world, I’m sort of charged with the responsibility to create a sustainable, growing, profitable business,” said Grimstad. “I want what’s best for all those constituents not the least of which is the shareholders. Overall, it’s a valuable asset in good markets with leadership positions.”

As for COVID-19, he said the uptick in the convenience economy somewhat masked all the tough decisions and hard work at Waitr.

“It’s somewhat masked the turnaround. A naysayer would say the results are an anomaly and when we get beyond COVID, these results won’t continue. I think that a lot of the pull through we would have seen regardless,” said Grimstad. “What I think has been a good thing for the industry and we benefit from … is that third-party has been validated and it’s mission critical. And I think the diner universe has gotten bigger.”

He said the bigger pie is nice, but the hard pivot toward sustainable operations that began in February will be nice for the long haul for all of Waitr’s constituents—or potential suitors.