Input now case insensitive. Also, spaces at start and end of strings are trimmed.