basic electrochemistry implemented

the meat of the electrochemistry-related changes are in this file