Slightly more efficient and fixed issue

Fixed issue from last version where inputs only worked if they were all
lowercase.