Changing the use of char to string

strings are not accepted into switch statements (fixed). changed the
logic of some error checking functions to accept strings and not char