 
 
     # Those are self explanatory and simply concern the DragnDrop.
-    drop: (e) -> @element.removeClass "drag-hover"
-    dragstart: o.noop
-    dragend: (e) -> @element.removeClass "drag-hover"
-    dragenter: (e) -> @element.addClass "drag-hover"
-    dragover: (e) -> @element.addClass "drag-hover"
-    dragleave: (e) -> @element.removeClass "drag-hover"
+    drop: (e) -> @element.classList.remove "drag-hover"
+    dragstart: noop
+    dragend: (e) -> @element.classList.remove "drag-hover"
+    dragenter: (e) -> @element.classList.add "drag-hover"
+    dragover: (e) -> @element.classList.add "drag-hover"
+    dragleave: (e) -> @element.classList.remove "drag-hover"
     
     # Called whenever files are dropped or selected
     selectedfiles: (files) ->
-      @element.addClass "started" if @element.is @previewsContainer
+      @element.classList.add "started" if @element == @previewsContainer
 
     # Called whenever there are no files left in the dropzone anymore, and the
     # dropzone should be displayed as if in the initial state.
     reset: ->
-      @element.removeClass "started"
+      @element.classList.remove "started"
 
     # Called when a file is added to the queue
     # Receives `file`
     addedfile: (file) ->
-      file.previewTemplate = o @options.previewTemplate
-      @previewsContainer.append file.previewTemplate
-      file.previewTemplate.find(".filename span").text file.name
-      file.previewTemplate.find(".details").append o """<div class="size">#{@filesize file.size}</div>"""
+      file.previewTemplate = createElement @options.previewTemplate
+      @previewsContainer.appendChild file.previewTemplate
+      file.previewTemplate.querySelector(".filename span").textContent = file.name
+      file.previewTemplate.querySelector(".details").appendChild createElement """<div class="size">#{@filesize file.size}</div>"""
 
 
     # Called whenever a file is removed.
     removedfile: (file) ->
-      file.previewTemplate.remove()
+      file.previewTemplate.parentNode.removeChild file.previewTemplate
 
     # Called when a thumbnail has been generated
     # Receives `file` and `dataUrl`
     thumbnail: (file, dataUrl) ->
-      file.previewTemplate
-        .removeClass("file-preview")
-        .addClass("image-preview")
-      file.previewTemplate.find(".details").append o """<img alt="#{file.name}" src="#{dataUrl}"/>"""
+      file.previewTemplate.classList.remove "file-preview"
+      file.previewTemplate.classList.add "image-preview"
+      file.previewTemplate.querySelector(".details").appendChild createElement """<img alt="#{file.name}" src="#{dataUrl}"/>"""
 
     
     # Called whenever an error occurs
     # Receives `file` and `message`
     error: (file, message) ->
-      file.previewTemplate.addClass "error"
-      file.previewTemplate.find(".error-message span").text message
+      file.previewTemplate.classList.add "error"
+      file.previewTemplate.querySelector(".error-message span").textContent = message
     
     
     # Called when a file gets processed. Since there is a cue, not all added
     # files are processed immediately.
     # Receives `file`
     processingfile: (file) ->
-      file.previewTemplate.addClass "processing"
+      file.previewTemplate.classList.add "processing"
     
     # Called whenever the upload progress gets updated.
     # You can be sure that this will be called with the percentage 100% when the file is finished uploading.
     # Receives `file` and `progress` (percentage)
     uploadprogress: (file, progress) ->
-      file.previewTemplate.find(".progress .upload").css { width: "#{progress}%" }
+      file.previewTemplate.querySelector(".progress .upload").style.width = "#{progress}%"
 
     # Called just before the file is sent. Gets the `xhr` object as second
     # parameter, so you can modify it (for example to add a CSRF token) and a
     # `formData` object to add additional information.
-    sending: o.noop
+    sending: noop
     
     # When the complete upload is finished and successfull
     # Receives `file`
     success: (file) ->
-      file.previewTemplate.addClass "success"
+      file.previewTemplate.classList.add "success"
 
     # When the upload is finished, either with success or an error.
     # Receives `file`
-    complete: o.noop
+    complete: noop
 
 
 

    "<strong>#{Math.round(size)/10}</strong> #{string}"

  drop: (e) ->
    return unless e.originalEvent.dataTransfer
    files = e.originalEvent.dataTransfer.files
    @emit "selectedfiles", files
    @handleFiles files if files.length


  ]



  defaultOptions:
    url: null
