New York CNN Business  — 

Two years ago, Uber was nearly derailed by allegations of sexism and harassment, a damning investigation into its workplace culture and the exodus of nearly all of its C-suite.

Now, it’s poised to make its Wall Street debut.

Uber filed paperwork to go public on Thursday in what is likely to be one of the biggest public offerings ever for a technology company. The IPO caps off Uber’s rapid and very public effort to overhaul its internal culture and move past a long list of scandals that upended the company. But as it prepares to go public, Uber continues to face challenges.

In his letter to shareholders in the company’s IPO filing, Uber CEO Dara Khosrowshahi admitted to the company making “missteps” on its road to go public.

“Of course, in getting from point A to point B we didn’t get everything right,” he wrote. “Some of the attributes that made Uber a wildly successful startup — a fierce sense of entrepreneurialism, our willingness to take risks that others might not, and that famous Uber hustle — led to missteps along the way.

“In fact, when I joined Uber as CEO, many people asked me why I would leave the stability of my previous job for one that was anything but. My answer was simple: Uber is a once-in-a-generation company, and the opportunity ahead of it is enormous.”

The company lost $1.8 billion in 2018, an unprecedented sum for a company about to go public. The filing noted its revenue was up 42% in 2018 to $11.3 billion. In its fourth quarter, Uber had 3.9 million drivers on its platform and users took 1.5 billion trips.

But Lyft (LYFT), its chief rival, gained market share amid Uber’s stumbles. And Uber, as well as Lyft (LYFT), faces ongoing scrutiny over safety and the steps it is taking to protect passengers.

What’s more, Lyft, the closest proxy to Uber on the stock market, quickly fell below its IPO price after going public last month. Lyft’s shares hit a new low this week, raising concerns for the stampede of unicorns — Silicon Valley shorthand for startups valued at $1 billion or more — looking to go public this year.

Uber does a U-Turn

For years, Uber seemed unstoppable. The company bulldozed ahead of ride-hailing rivals through a mix of aggressive fundraising, dirty tricks and a take-no-prisoners attitude toward expansion in the United States and abroad. Along the way, Uber destabilized the taxi industry, became the most valuable US startup and emerged as the darling of Silicon Valley, spawning an entire category of companies billing themselves as the “Uber for X.”

But that changed in 2017 when former engineer Susan Fowler rocked the company by making public allegations of sexism and harassment in a lengthy blog post. An internal investigation revealed a reckless office culture where “toe-stepping” was a prized value and executives had unchecked power. Travis Kalanick, Uber’s cofounder and then CEO, admitted he needed to “grow up” after being caught on camera arguing with an Uber driver.

Kalanick was ultimately ousted in June 2017. At that point, Uber was operating without a CEO, CFO, COO or CMO.

Uber replaced the brash Kalanick with Dara Khosrowshahi, a seasoned executive who previously ran Expedia (EXPE). Khosrowshahi quickly stressed that Uber had to change. “What got us here is not what’s going to get us to the next level,” he said.

Since then, he has revamped the company’s cultural norms, which now include maxims like “We Do The Right Thing,” in stark contrast to Kalanick’s edict to “Always Be Hustlin’.” He’s made key executive hires, including a CFO after three years without one. And he’s put to rest some outstanding crises, including a major lawsuit with Google’s self-driving car unit Waymo over the alleged stealing of trade secrets.

He has taken a more agreeable, conciliatory approach with cities and regulators, though there are some limits to that. For example, Uber sued New York City in February over its temporary cap on new vehicle licenses, claiming the city plans to make the cap permanent.

Under Khosrowshahi, Uber also reconsidered its efforts to operate all across the world. “One of the potential dangers of our global strategy is that we take on too many battles across too many fronts and with too many competitors,” he said last year.

But safety remains a challenge for the company. Uber continues to find itself in the spotlight over unflattering incidents, ranging from a pedestrian being struck and killed by one of its self-driving vehicles to a CNN investigation into sexual assault and abuse by ride-hailing drivers.

Uber vs. Lyft

Uber had been waging a winner-take-all-battle, but its troubles proved to be an opening for its much smaller rival in the United States.

In it its filing to go public, Lyft said its share of the US ridehailing market spiked to 39% in December 2018 from 22% at the end of 2016, a period that coincides with Uber working through its scandals and leadership changes.

The narrowing gap may force Uber to continue spending heavily on advertising and promotional offers to attract more riders. Lyft, like Uber, is operating deep in the red right now amid that fight. Lyft lost nearly $1 billion in 2018.

Yet, the two companies have also taken different approaches to expansion.

Uber has invested in a suite of services, including freight shipping and meal deliveries. The latter, Uber Eats, is seen as a key growth driver for the company. Khosrowshahi told CNN Business in August that “Uber is not a one-note company. We’re a selection of different businesses, with different maturities and growth profiles.”

Lyft, by comparison, says it’s uninterested in these supplementary business lines.

“We are solely focused on consumer transportation,” Lyft cofounder John Zimmer said in a video pitch to investors last month ahead of its IPO. “Not food. Not trucking.”

Uber also invested real money and resources to expand across several continents, before selling off some of its regional businesses. Recently, however, it showed a continuing commitment to be a global brand with the $3.1 billion acquisition of Careem, a Middle East rival.

Lyft’s claim as an international company is more aspirational. The company currently only operates in the United States and Canada.

For all the rivalries between the two companies, Uber and Lyft may be tied at the hip for now. If Lyft’s stock continues to fall, it could make Uber’s road to Wall Street bumpier.