 # types of input which will return what the developer would expect given the
 # context it is used.
 lucaUtilityHelper = (payload, args...)->
+  unless payload?
+    return _( Luca.Application.instances ).values()?[0]
+
   if _.isString(payload) and result = Luca.cache(payload)
     return result
 

  Luca.registry.namespace "#{ namespace }.views"
  Luca.Collection.namespace "#{ namespace }.collections"

  Luca.on "ready", Luca.define.close
  Luca.on "ready", Luca.setupCollectionSpace

Luca.onReady = (callback)->
  Luca.trigger("ready")
  $ ->
    callback.apply(@, arguments)

Luca.warn = (message)->
  console.log(message) if Luca.config.showWarnings is true


Luca.config.showWarnings = true

Luca.setupCollectionSpace = (options={})->
  {baseParams, modelBootstrap} = options

  if baseParams? 
    Luca.Collection.baseParams( baseParams )
