Add JSIOExtension, some refactoring.