Split the user prompting code into functions.

Fixed error checking choices.
Fixed #4