Some robustness added

Added some code to make Choicefunct() more robust. Choice is now
converted to lower case before it is checked against all of the if
statements.