       else
         callback null, fullName
 
-  @claimAll = (sources, callback=->)->
+  @claimAll = (sources, callback = -> ) ->
     i = 0
     konstructorCount = sources.length
-    sources.forEach ({konstructor, usedAsPath})=>
+    sources.forEach ({ konstructor, usedAsPath }) =>
       fields = {}
       fields[usedAsPath] = 1
       j = 0
-      konstructor.count (err, docCount)=>
+      konstructor.count (err, docCount) =>
         if err then callback err
         else
-          konstructor.someData {}, fields, (err, cursor)=>
+          konstructor.someData {}, fields, (err, cursor) =>
             if err then callback err
             else
-              cursor.each (err, doc)=>
+              cursor.each (err, doc) =>
                 if err then callback err
                 else if doc?
-                  {collectionName} = konstructor.getCollection()
+                  { collectionName } = konstructor.getCollection()
                   name = getAt doc, usedAsPath
                   slug = {
                     collectionName

          $set: { oldSecretName, secretName }
        }, -> callback null, oldSecretName, secretName
        setTimeout ->
          secretNameObj.update { $unset: oldSecretName: 1 }, ->
        , 5000

  @fetchSecretName =(name, callback)->
    JSecretName = require './secretname'
    JSecretName.one {name}, (err, secretNameObj) =>
      if err then callback err
      else unless secretNameObj
        secretNameObj = new JSecretName {name}
        secretNameObj.save (err) =>
          if err then callback err
          else callback null, secretNameObj.secretName
      else

        #@emit 'channel-control'
        callback null, secretNameObj.secretName, secretNameObj.oldSecretName

  stripTemplate = (konstructor, nameStr) ->
    { slugTemplate } = konstructor#Base.constructors[@constructorName]
    return nameStr  unless slugTemplate
    slugStripPattern = /^(.+)?(#\{slug\})(.+)?$/
    re = RegExp slugTemplate.replace slugStripPattern,
      (tmp, begin, slug, end) -> "^#{begin ? ''}(.*)#{end ? ''}$"
    nameStr.match(re)?[1]

  stripTemplate: ->
    stripTemplate Base.constructors[@constructorName], @name

  @fetchModels = do ->

    fetchByNameObject = (nameObj, callback) ->
      models = []
      queue = nameObj.slugs.map (slug, i) -> ->
        konstructor = Base.constructors[slug.constructorName]
        return queue.fin() unless konstructor
        selector = {}
        selector[slug.usedAsPath] = slug.slug
        konstructor.one selector, (err, model) ->
          return queue.fin() if err or not model
          models[i] = model
          queue.fin()
