Advanced electrolysis techniques