Improvements to beam_energy_sim