Update with new confidence function; fix unicode.