A compilation and analysis of building permits filed by Tesla since July 2016 has revealed that the Elon Musk-led company spent over $51.3 million in construction permits for the Fremont factory over the past two years. Tesla also invested more than $30 million in permits for nearby facilities, including its new offices located at Dumbarton Circle in Fremont’s Ardenwood District.

The breakdown of Tesla’s expenses in the development and continued improvement of the Fremont factory was compiled by BuildZoom, which sorted through the permits filed by the company using its National Building Permit Database. As could be seen in BuildZoom‘s findings, Tesla spared no expense when it came to ensuring that its main factory is optimized to tackle the immense challenge of producing the Model 3 at scale. Below is a table of Tesla’s expenses for the Fremont factory over the past two years. Do take note, however, that the expenses reflected do not account for the cost of robots and other equipment that Tesla purchased for each portion of the 370-acre site.

Over the past two years, Tesla had filed several building permits for Fremont that cost over $1 million, among these being a $4.5 million grading and foundation permit for a 104,324-square-foot North GA3 (General Assembly 3) building. Two permits, worth $4.2 million and $2 million, respectively, were listed as “capacity increases” to the North Paint building. Other noteworthy permits include a $1.2 million and $800,000 project for two new facilities — one of which being a sprung structure — as well as a $400,000 “Tesla Sunrise” road with bio-retention system at the factory’s Eastern boundary.

As a means to adapt to the mass number of Model 3 reservations it received, Tesla had filed roughly 100 industrial and commercial alteration permits for the Fremont factory since July 2016, costing a total of $16.2 million. Tesla also invested substantially in several key areas of the factory, including its body/assembly line, its paint shop, and its stamping building.

Tesla’s body and assembly building covers one of the largest areas in the Fremont factory. Since July 2016, Tesla spent more than $21.4 million (excluding the cost of machinery) on additions and improvements to the assembly and body area. Permits worth $14.2 million were also filed to develop infrastructure for GA3. Tesla’s stamping building, which houses one of the world’s 35 existing high-end Schuler servo stamping presses, has also seen $809,000 worth of improvements since July 2016. The location of these facilities could be viewed in the image below.

The electric car maker’s paint shops, both North and South, received $10.2 million worth of improvements since July 2016, including $240,000 spent on fire prevention systems like sprinklers, fire detectors, and other safety systems. Permits also reflected a $5.2 million investment on AFES (Automatic Fire Extinguishing System) for the factory.

Perhaps most interesting in Tesla’s permits, however, were filings referencing “Sprung” and “repack” tent structures that are worth $2.9 million. As revealed by Elon Musk recently, the largest of these tents is now the site of the Model 3’s newest assembly line, dubbed as GA4. Musk has been particularly optimistic about the tent-housed Model 3 line, stating on Twitter that it has a “slightly higher quality” than traditional assembly lines.

With the end of the second quarter just a few days away, Tesla is now working at a breakneck pace in its attempt to hit its all-elusive goal of producing 5,000 Model 3 per week by the end of Q2 2018. With Musk stating that GA4 is now working, and with sightings of lots filled with Model 3 being reported around the facility, it appears that Tesla is closer to its target than ever before.