Simplify Loop ending to be defined in a single place. No functionality change.
Simplify Loop ending to be defined in a single place. No functionality change.
leios/demonsimulationcode,leios/demonsimulationcode