Why we shall reset cidToUnicode but keep unicodeToCID intact? Will it be better to move this section at the beginning of the function and return earlier?