 
   script_tag = jslib_jail_doc.createElement 'script'
   script_tag.appendChild(
-    jslib_jail_doc.createTextNode("""window.FactlinkConfig = #{JSON.stringify(window.FactlinkConfig)};
-
-#{jslib_jail_code};
-
-window.parent.FACTLINK_ON_CORE_LOAD();
-"""))
+    jslib_jail_doc.createTextNode(
+      "#{jslib_jail_code};window.parent.FACTLINK_ON_CORE_LOAD();"))
   jslib_jail_doc.documentElement.appendChild(script_tag)
 
-  style_tag = (mkEl 'style') null, document.createTextNode(style_code)
-  document.getElementsByTagName('head')[0].appendChild style_tag
 
 jslib_jail_code = __INLINE_JS_PLACEHOLDER__
 style_code = __INLINE_CSS_PLACEHOLDER__


  window.FACTLINK_ON_CORE_LOAD = ->
    # This seems to be necessary, don't understand entirely why
    window.FACTLINK.easyXDM = jslib_jail_iframe.contentWindow.Factlink.easyXDM

    for methodCall in storedMethodCalls
      jslib_jail_iframe.contentWindow.Factlink[methodCall.name](methodCall.arguments...)
    storedMethodCalls = []

  #### Load iframe with script tag
  jslib_jail_doc = jslib_jail_iframe.contentWindow.document


    window.FACTLINK[name] = ->
      if jslib_jail_iframe.contentWindow.Factlink?
        jslib_jail_iframe.contentWindow.Factlink[name](arguments...)
      else
        storedMethodCalls.push {name: name, arguments: arguments}
      return # don't return the value, as we can't do that when storing calls

  proxy_method 'on'
  proxy_method 'triggerClick'
