Electron beam treatment of devices