Soft electron ID implementation from Simon de Visscher
(collapsed 5 commits to one for brevity)