   root.module or= moloFunc
 
   # Compability to official definition (https://github.com/amdjs/amdjs-api/wiki/AMD)
-  root.define = (name, deps, defines) -> 
+  root.define = (name, deps, defines) ->   
     unless Array.isArray deps
       defines = deps
       deps = []

        
      firstScriptElem = root.document.getElementsByTagName('script')[0]
      firstScriptElem.parentNode.insertBefore scriptElem, firstScriptElem

  moloFunc = (name, defines) ->
    # TODO: Add module name always to queue and remove it if all dependencies have been met

    
    # Skip flag to skip the rest of the function
    skipFunc = false
    
    defObject = {}

    # If name is not a string, it's an anonymous module (Put defines parameter in the correct order)
    if typeof name isnt 'string'
      # If name is an array, just load dependencies
      if Array.isArray(name) 
        if Object.keys(defines).length > 0
          defines.require = name
        else
          defines =
            require: name

        skipFunc = true
      else 
