Electrochemistry, a branch of chemistry, went through several changes during its evolution from early principles related to magnets in the early 16th and 17th centuries, to complex theories involving conductivity, electric charge and mathematical methods. The term electrochemistry was used to describe electrical phenomena in the late 19th and 20th centuries. In recent decades, electrochemistry has become an area of current research, including research in batteries and fuel cells, preventing corrosion of metals, the use of electrochemical cells to remove refractory organics and similar contaminants in wastewater electrocoagulation and improving techniques in refining chemicals with electrolysis and electrophoresis.