On Wednesday, Tesla posted a Q4 2016 loss of $121.3 million, but the loss was narrower than the $320 million net loss from the year earlier. The company said it made $2.28 billion in revenue in the quarter, up from $1.24 billion in Q4 the year before. Tesla reported $7 billion in annual gross revenue in 2016.

All that comes on the heels of a Q3 in which the company posted a rare profitable quarter that CEO Elon Musk called Tesla’s “best quarter ever.”

The company said its gross margin fell between the third and fourth quarters of 2016 due to lower Zero Emissions Vehicle credit sales in Q4 compared to the quarter before. In the last three months of the year, Tesla completed its acquisition of SolarCity as well as Grohmann Engineering, which will become Tesla Advanced Automation Germany.

In its investor letter, Tesla stated that it’s going into 2017 expecting to invest considerable resources in Model 3 development, which is still on track to begin this summer. This includes expanding the capabilities of Tesla’s mobile repair service so that roving bands of Tesla service people can do minor repairs at the owner’s home or office. Tesla is also anticipating a significant expansion of North American Supercharger stations, which the company hopes to double in 2017.

The company said that it has already begun the process of installing Model 3-specific manufacturing equipment at the company’s Fremont, California factory as well as at the company’s Gigafactory in Sparks, Nevada. In Tesla’s investor letter, the company referred to the Sparks plant as “Gigafactory 1” and SolarCity’s Buffalo, NY solar panel factory as “Gigafactory 2,” adding that “we expect to finalize locations for Gigafactories 3, 4 and possibly 5,” in the coming year.

The company said it expected to sell 47,000 to 50,000 Model S and Model X vehicles in the first half of 2017.

Tesla also wrote that it would begin to break out revenue and cost of revenue attributable to “Energy generation and storage” instead of lumping it into “Services and other.” The company’s earnings included results from SolarCity operations starting from mid-quarter, when the acquisition was finalized on November 21. Tesla listed $131 million in energy generation and storage revenue, up from $23,000 the quarter before.

On the company’s earnings call Wednesday afternoon, Musk said that he anticipated “the storage market could grow at maybe twice the rate of the automotive business.” In Q4, Tesla delivered a large lithium ion battery substation for Southern California Edison, and it will deliver a similar storage facility on Kauai next month.

Musk announced on the earnings call that Tesla’s Chief Financial Officer Jason Wheeler would leave the company in April “to pursue opportunities in public policy” and the company’s former CFO, Deepak Ahuja, would rejoin the company in March.

Interestingly, Tesla executives admitted on the investor call this afternoon that the company has been quietly rolling out an insurance package (with partnering insurance firms) to new Tesla owners, reasoning that if a Tesla is safer than other vehicles with Autopilot, then insurance should adapt accordingly. The company foresees eventually offering a maintenance and insurance package with its cars.