A number of error catches have been introduced.  If the user specifies input that is not sensible (or possible), the program will exit.