Tesla has laid off about 9 percent of its employees as part of a “company-wide restructuring,” according to an email sent to staff by CEO Elon Musk this morning. The cuts, which account for more than 3,000 jobs, will not affect the company’s continued effort to ramp up production of the Model 3 sedan, Musk said.

“We made these decisions by evaluating the criticality of each position, whether certain jobs could be done more efficiently and productively, and by assessing the specific skills and abilities of each individual in the company,” Musk wrote. “In order to minimize the impact, Tesla is providing significant salary and stock investing (proportionate to the length of service) to those we are letting go.”

Tesla has recently faced pressure from its investors to ramp up production of the Model 3. The company had $2.6 billion in cash at the end of the first quarter of the year, and it’s spending around $1 billion every quarter. While sales of the more expensive Models S and X continue to tick up each quarter, the company needs to start making money on the Model 3 if it wants to turn a profit, or it will have to borrow or raise more capital soon — something Musk has insisted the company won’t do this year.

“Given that Tesla has never made an annual profit in the almost 15 years since we have existed, profit is obviously not what motivates us,” he wrote today. “What drives us is our mission to accelerate the worlds transition to sustainable, clean energy, but we will never achieve that mission unless we eventually demonstrate that we can be sustainably profitable. That is a valid and fair criticism of Tesla’s history to date.”

Musk first signaled that a reorganization was coming in April

The company has missed a number of deadlines for Model 3 production targets, though the CEO said at last week’s annual shareholder meeting that Tesla is now making 500 per day, or about 3,500 per week. Tesla is trying to get to a rate of 6,000 Model 3s per week by the middle of the year, at which point it will break even on each car it turns out, according to the company’s most recent earnings report.

Musk first signaled that a reorganization of the company’s structure was coming in an April email to Tesla staff. In it, he wrote about how unnecessary expenses, “excessive” meetings, “poor” communication, and a “Russian nesting doll” series of contractors who “never want to end the money train” were hampering the company’s progress toward meeting his ambitious goals.

Difficult, but necessary Tesla reorg underway. My email to the company has already leaked to media. Here it is unfiltered: pic.twitter.com/4LToWoxScx — Elon Musk (@elonmusk) June 12, 2018

In a subsequent May email, Musk announced he was “flattening” Tesla’s management structure. That followed news that the company’s chief engineer was taking a leave of absence and the departure of Tesla’s government safety liaison. Later in the month, Tesla announced a handful of new hires at the director and executive level, some coming from companies like Apple and Amazon.

The new round of layoffs will not affect Tesla’s recent efforts to hire more employees to shore up production of the Model 3, Musk said in today’s email. “[T]here is still a significant need for additional production personnel,” he wrote. “I also want to emphasize that we are making this hard decision now so that we never have to do this again.”

“We are making this hard decision now so that we never have to do this again.”

In April, Musk asked employees to refer “anyone you know who you think meets the Tesla bar for talent, drive and trust” so that the company could produce its newest electric car around the clock.

The push to make more Model 3s, which Musk has referred to as “production hell,” has faced scrutiny from a number of parties inside and outside of the company. This week, Tesla’s former director of environmental, health, safety, and sustainability filed a lawsuit claiming he was wrongfully terminated for calling out unreported injuries at the company’s Fremont assembly factory. (Tesla says the former director was fired after the company received an “onslaught of complaints” about his behavior in the workplace.)

In an April report from the nonprofit news organization Reveal, five former members of that same team made similar claims about how Tesla allegedly didn’t properly report workplace injuries. A recent CNBC report detailed a number of previously undisclosed fires at the company’s paint shop.

“This is the most excruciating, hellish several months that I’ve ever had,” Musk said at the recent shareholder meeting.

In his email to employees, Musk also announced that Tesla will discontinue a recently announced initiative to sell its home energy generation and storage products at Home Depot. “The majority of Tesla employees working at Home Depot will be offered the opportunity to move over to Tesla retail locations,” he wrote.

Correction: This article previously misquoted part of Musk’s email. Musk said there was “valid and fair criticism,” not “valid unfair criticism.” It has been updated to reflect this change.