   # Please make sure about your changes on it.
   @putAppScript = (app, callback = noop)->
 
-    @unloadAppScript app
-
-    identifier = app.identifier
-
     if app.style
-      @appendScriptElement 'style',  { url:app.style, identifier, callback }
+      @appendScriptElement 'style',  \
+        { url:app.style, identifier:app.identifier, callback }, yes
 
     if app.script
-      @appendScriptElement 'script', { url:app.script, identifier, callback }
+      @appendScriptElement 'script', \
+        { url:app.script, identifier:app.identifier, callback }, yes
 
   @unloadAppScript = (app, callback = noop)->
 
     identifier = app.identifier.replace /\./g, '_'
 
-    $("head .internal-style-#{identifier}").remove()
-    $("head .internal-script-#{identifier}").remove()
+    @destroyScriptElement "style", identifier
+    @destroyScriptElement "script", identifier
 
     KD.utils.defer -> callback()
 

    if vmName

      file = FSHelper.createFileFromPath url
      file.fetchContents (err, partial)->
        return  if err
        obj = new KDCustomHTMLView {domId, tagName, partial}

        if type is 'script'
          obj.once 'viewAppended', -> callback null

          type     : "text/javascript"
          src      : url
        bind       = "load"
        load       = -> callback? null

      @destroyScriptElement type, identifier  if force

      document.head.appendChild (new KDCustomHTMLView {
        domId, tagName, attributes, bind, load
      }).getElement()

  @destroyScriptElement = (type, identifier)->
    (document.getElementById "internal-#{type}-#{identifier}")?.remove()

  # #
  # MAKE NEW APP
