ElectronBeam code Cleanup