refactor ecma script support as one library