             then console.error err
             else console.log "#{referrer} referred #{username}"
 
-            _queue.next()
-
-      -> queue.next()
+            queue.next()
+
+      ->
+        return callback null
 
     ]
 
-    daisy _queue
-
-
-  createDefaultStackForKodingGroup = (options, queue) ->
+    daisy queue
+
+
+  createDefaultStackForKodingGroup = (options, callback) ->
 
     { account } = options
 

      # We are not returning error here on purpose, even stack template
      # not created for a user we don't want to break registration process
      # at all ~ GG
      queue.next()


  confirmAccountIfNeeded = (options, callback) ->

    daisy queue


  updateAccountInfo = (options, callback) ->

    { account, referrer, username } = options

    queue = [

      ->
        account.update { $set: { type: 'registered' } }, (err) ->
          return callback err  if err?
          queue.next()

      ->
        account.createSocialApiId (err) ->
          return callback err  if err
          queue.next()

      ->
        # setting referrer
        return queue.next()  unless referrer

        if username is referrer
          console.error "User (#{username}) tried to refer themself."
          return queue.next()

        JUser.count { username: referrer }, (err, count) ->
          if err? or count < 1
            console.error 'Provided referrer not valid:', err
            return queue.next()

          account.update { $set: { referrerUsername: referrer } }, (err) ->

