#27 minorly refactor Encoding Detector and fix an old typo