It looks like Hampton Creek's wild year will end on a high note.The San Francisco food startup, which in the past 12 months has faced down a lawsuit from Unilever, defended allegations of improper workplace practices and been targeted by the American Egg Board, has won a four-month battle to keep the name of its flagship product.

Hampton Creek announced an agreement Thursday with the Food and Drug Administration that allows the startup to continue calling its eggless mayonnaise product made with yellow peas "Just Mayo."

"I feel pretty proud about it," Hampton Creek CEO Josh Tetrick said about the agreement, which he said was finalized last night. "I think this creates a really extraordinary path for creating better food."

He said he viewed the FDA's decision as an example of policy makers making it easier to produce higher quality food available to consumers at an affordable price.

"We didn't start the company to be a mayo company; we wanted to have an impact," he said.

The FDA told the company in August that the product didn't fit the definition of mayonnaise because it did not contain eggs, and that the label needed to be changed. The San Francisco startup has agreed to make changes to the label to clarify the meaning of the use of the term "just."

The old label said "Joy on your sandwich" on the side. The new label states, "Good food would be tastier and less expensive whether you're a single mom in Alabama or a college student in Michigan. That's just, and that's the point of Hampton Creek." The new label also contains a definition of "just" on the front part of the label.

Around the same time FDA challenged the phrasing of the label, an MIT Ph.D. candidate received documents he had requested from the U.S. Department of Agriculture that revealed that the USDA-appointed American Egg Board had waged a calculated campaign against the Bay Area food startup.

Ryan Shapiro had been inspired to file the Freedom of Information Act request after seeing reports of Unilever suing Hampton Creek over the Just Mayo name (that lawsuit was later dropped.)

Hampton Creek emphasized in a statement that the FDA and USDA issues are separate.

Allegations of improper product testing and workplace practices at Hampton Creek also surfaced earlier this year, putting the startup on the defensive. 

The FDA said in a statement, "The FDA and the company met to discuss the issues cited in the warning letter and worked together to address them. The company committed to making labeling changes to ensure its products are labeled in a manner that is truthful and not misleading. Therefore, the FDA considers the issues cited in the warning letter to be resolved and will issue a close out letter soon.

This article has been revised to remove a quote that the company says was not authorized. The quote came from a media relations manager at a public relations firm that sent Inc. a press release about the news and arranged for Inc. to speak with the company CEO.