Added ability to configure specialCaseChars and groupDiffs, and cleaned ...

...up some of the code