More itext.class.js refactoring