clean up input (added EOF checking), fixed bug in RoundEnd for ending condition