More exception handling for number ranges

Simple while loops added to handle integers added outside of the allowed range.