Two years after WeWork's (WE  ) IPO imploded spectacularly, the company is now public on US stock exchanges, with shares climbing 13.5% on the first day of trading.

Through a merger with BowX Acquisition Corp, a special purpose acquisition company, WeWork received a valuation of roughly $8 billion and got $1.3 billion in proceeds from the deal.

Founded in 2010, WeWork rents out larger office spaces which it then divides into subleases, which can last for as little as a month. The company was once the poster child for startup excess. Flush with private capital, WeWork valued itself at $47 billion for its 2019 public offering, despite burning through $2 billion in cash each year.

Investors roundly rejected that bid, and questions about cash flows and corporate governance led to the eventual ousting of WeWork's then CEO and co-founder, Adam Neumann.

"Too much focus has been placed on me," said Neumann at the time.

Eventually, WeWork had to be rescued by its largest stakeholder, SoftBank, to the tune of roughly $9 billion.

In the wake of its aborted 2019 bid, WeWork has gone a long way toward reforming itself under the leadership of its current Chief Executive, Sandeep Mathrani.

The company has trimmed excess, renegotiated leases, and cut jobs, all in an effort to make the company finally profitable. Since 2019, the company has left or renegotiated 500 of its worst leases, cut leasing expenses by $400 million, and reduced administrative costs by $1 billion. And, more than half of its tenants are enterprise customers whose leases tend to be more stable and profitable than those of individual workers.

Covid-19 hit the company hard, of course, at the onset of the pandemic, occupancy fell to just 46%. Meanwhile in 2021, net losses at the company expanded by $25 million, year over year for the period ending June 30.

However, at an investor presentation earlier this month, WeWork reported $228 million in revenue in September, making it its best month all year. The company also said that occupancy rates had inched back up to 60%.

During a television appearance, Mr. Mathrani has said he expects WeWork to turn a profit next year, owing to cost-savings the company realized during the pandemic.

And while WeWork specializes in physical office spaces, Mr. Mathrani believes the company stands to uniquely benefit from the work-at-home revolution, as many workers now prefer a mix of at-home and in-office work.

"As companies around the world reimagine their workplace, WeWork is uniquely positioned," Mr. Mathrani said last Wednesday.

As part of embracing this flexible future, the company rents out office spaces on-demand and even offers all-access passes for random bouts of co-working.

Today it seems that WeWork has largely learned the hard lessons from its failed 2019 bid. Back then, the company was essentially a dumpster fire for private capital. Neumann led the WeWork to partner with an indoor wave pool company, and even opened its own elementary school.

Mr. Neumann himself owned a $60 million private jet and even went so far as to trademark the word "We," which he then licensed back to his own company, to the tune of roughly $5 million.

"We made a failure on investing in WeWork," said Masayoshi Son, the billionaire founder of SoftBank, last year. "I was foolish."

Today Mr. Son is "very excited," according to SoftBank Chief Operating Officer Marcelo Claure, who, along with Mr. Mathrani, will sit at the helm of WeWork going forward.