Minor fix in IMPORTED; refactoring
Remove setEncoding call in JS