The last few years have brought remarkable improvements in renewable solar- and wind-energy production. But a key problem remains: How do you store that energy when the sun sets and the wind stops?

A team of Harvard University researchers are addressing that need by creating new compounds that could pave the way for less toxic, less expensive and longer lasting batteries for the energy market.

The team is lead by Harvard's Michael Aziz, professor of materials and energy technologies and Roy Gordon, a chemistry and materials science professor. It turns out their solution was electrolyte solution. Two solutions, to be exact.

The base of their research is the flow battery — used primarily in power-grid backups, renewable-energy storage and other industrial areas. It operates by pumping liquid electrolyte solutions across either side of a membrane that allows ions to pass. (This is different from the battery in your phone or flashlight, which runs on ions passing between solid or semi-solid anodes and cathodes.) Electrodes connected to the two electrolyte solutions create the battery terminals.

Flow batteries offer several benefits: You can create a bigger battery simply by adding bigger solution tanks. They can be rapidly recharged by replacing the electrolyte. The projected battery lifespan is more than 20 years (as opposed to the 8-year warranty for the Lithium-ion battery in a Tesla, for example). And they have a charge/discharge lifespan measured in thousands of cycles — with only minimal loss of capacity.

RELATED: Tesla Unveils Home Battery to Get You Off the Grid

The downsides are, literally, big: their size, the expense for energy stored and their often toxic makeup.

Flow batteries are already deployed in industrial settings in the U.S. and overseas. These are built with ions of vanadium (a rare, expensive metal) in a solution spiked with hydrochloric acid — and this is where the research at Harvard focused. The SEAS team created new electrolyte molecules from the fairly common organic compounds viologen (one type of viologen is among the world's most common herbicides) and ferrocene.

"What we have done is stick some extra atoms onto the viologen and ferrocene," Aziz said.

These new molecules can be held as a solution in plain water — a huge breakthrough. Together, this replaces the costly vanadium and the corrosive acid needed to hold it in solution. And that allows for less-expensive pumps, tanks and ion membranes to be used in the battery. Cheaper mechanicals combined with the new, possibly cheaper electrolytes create the possibility to dramatically reduce basic battery costs and toxicity. "If it spilled on the floor," Gordon said in a statement, "it wouldn't eat the concrete."

Aziz said the final technology could be cheaper than current vanadium flow batteries or the Tesla Powerwall, a home-based lithium-ion battery based on the technology used in Tesla cars.

"We believe we're on a path to getting the costs below where lithium-ion batteries will be when this technology is mass produced," said Aziz.

RELATED: Captured CO2 Could Fuel a Giant Underground Battery

"The technology is good," said Shriram Santhanagopalan, a senior engineer at the Advanced Vehicles Group of the National Renewable Energy Laboratory. He said he has been following Aziz's work for some time. However, it's "three to four times the size of a traditional lithium-ion battery size for the same amount of energy. It's just going to be a huge battery the size of your garage [rather] than your car."

It might be a year or two before the battery is ready for commercial testing, Aziz said. His team is still refining the ion membrane and tweaking the viologen and ferrocene molecules.

This research is the fourth in a series of papers published by SEAS on flow battery technology. "I can't really say this particular publication is groundbreaking," Aziz said. But of the whole body of research: "I think just about anyone would say this is groundbreaking."

WATCH: Can This Wearable Tech Make You a Power Plant