     Module::update.apply this, arguments
 
   save:->
-    @html = @generateHTML @content
+    @html     = JMarkdownDoc.generateHTML @content
+    @checksum = JMarkdownDoc.generateChecksum @content
     super
 
+  @create$ = secure (client, formData, callback)->
+    formData.origin = client.connection.delegate.getId()
+    @create formData, callback
+
   @create = (formData, callback)->
-    data = formData
-    markdownDoc = null
-
-    daisy queue = [
-      =>
-        data.checksum = @generateChecksum data.content
-        queue.next()
-      =>
-        markdownDoc = new @ data
-        queue.next()
-      ->
-        markdownDoc.save (err)->
-          if err then callback err
-          else callback null, markdownDoc
-    ]
+    markdownDoc = new @ formData
+    markdownDoc.save (err)->
+      if err then callback err
+      else callback null, markdownDoc


module.exports = class JMarkdownDoc extends Module

  {daisy} = require 'bongo'

  @share()


      content   : String
      html      : String
      checksum  : String
      origin    : ObjectId
    sharedMethods   :
      static        : ['generateHTML']

