     groupSelector = {
       privacy:'public'
     }
-
-    generateMainSitemap = (sitemapNames)=> 
+    generateSitemapIndex = (sitemapNames)=>
       name = "sitemap.xml"
-      content = @generateSitemapString sitemapNames, true
+      content = @generateSitemapIndexString sitemapNames
       @saveSitemap name, content
 
     JGroup.count groupSelector, (err, groupCount)=>

            'slugs.group': { $in: publicGroups }
          }

          # Empty the group, it'll be filled in next cycle.
          publicGroups = []

          JName.count selector, (err, count)=>

                queue.next()
            queue.push => groupQueue.next()
            daisy queue


      groupQueue.push => generateSitemapIndex(groupQueue.sitemapNames)
      daisy groupQueue


