Typo fixes & rewrite of 'isOperator' and charset.