Tesla's (TSLA) - Get Report longtime CTO is out, CEO Elon Musk told investors on Wednesday, capping off a disappointing quarterly report that missed earnings estimates by a wide margin. 

On an earnings call, Musk told investors that J.B. Straubel, who oversaw the engineering and design of Tesla vehicles and has been with the carmaker since 2003, will be taking on an advisory role. Drew Baglino, currently a VP of technology at Tesla, will be taking over Straubel's position. 

Straubel is credited with building Tesla's battery technology, in addition to leading the hardware and software builds of Tesla vehicles, and is the latest C-level executive at Tesla to depart this year. Tesla's former CFO, Deepak Ahuja, announced his retirement in late January. 

Tesla shares were down 9% in after-hours trading on Wednesday after the company posted an adjusted loss that badly missed targets, at $1.12-per-share versus the 40 cents per share expected analysts. It also missed revenue estimates, posting $6.35 billion for the quarter versus the expected $6.41 billion. Automotive gross margin, a closely watched metric among Tesla investors, dropped to 18.9% from 20.6% in the year-ago quarter.

Tesla's latest financial results left many scratching their heads, since weeks ago the carmaker announced a record quarter for deliveries, which totaled 95,356 vehicles last quarter and more than 77,000 Model 3s. Despite ongoing improvements in capital efficiency, the record deliveries still produced a net loss of $408 million for the quarter -- a far cry from the sustainable profitability that Musk has long promised. 

"We expect to be around breakeven this quarter and profitable next quarter," Musk told investors. "I feel pretty confident about that."

Musk initially projected consistent profitability at Tesla in 2018, but that goal has since proved slippery and the timeline usually accompanied by caveats or hedges on the part of the Tesla chief. 

"Model S and Model X are getting stale and Tesla needs to do something to keep shoppers interested in these higher profit vehicles. And questions remain about the cash flow and profitability impact of the Model 3 leasing program," Jessica Caldwell, director of Insights at Edmunds, wrote in an email.

Amid cuts in EV tax credits and looming competition in the market, the question of sustainable Model 3 demand is still a central one for investors.

Asked whether he believes Tesla benefited disproportionately from a rush of orders earlier this year tied to a tax credit stepdown, CFO Zach Kirkhorn responded in the negative.

"Generally speaking, our order rates in this quarter are higher than they were last quarter," he said.  

Tesla didn't provide much in the way of guidance either, writing in an earnings release that it is "simplifying" its approach to guidance this quarter. It reiterated its target of delivering 360,000 to 400,000 vehicles in 2019, and, guided for 2019 capex spending of $1.5 to $2.0 billion, a reduction from prior guidance.