   query.exec (err, levelSessions) ->
     if err then return cb err
     levelSessionIDs = _.pluck levelSessions, "_id"
-    async.each levelSessionIDs, transpileLevelSession, (err) ->
-      if err then return cb err
-      cb null
+    transpileLevelSession levelSessionIDs[0], (err) ->
+      throw err if err
+    #async.each levelSessionIDs, transpileLevelSession, (err) ->
+    #  if err then return cb err
+    #  cb null
     
   
 transpileLadderSessions = ->
   queryParameters = 
     type: "ladder"
-    version:
-      "isLatestMajor": true
-      "isLatestMinor": true
+    "version.isLatestMajor": true
+    "version.isLatestMinor": true
   selectString = "original"
   query = Level
     .find(queryParameters)

          problems: {}
          language: "javascript"
          functionName: spellID
          functionParameters: {}
          yieldConditionally: spellID is "plan"
          globals: ['Vector', '_']
          protectAPI: true
          includeFlow: false
        aether = new Aether aetherOptions
        transpiledCode[thang][spellID] = aether.transpile spell
    cb "Prematurely ended"
    
  
  

findLadderLevelSessions = (levelID, cb) ->
  queryParameters = 
    level:
      original: levelID + ""
    submitted: true
    
  selectString = "_id"

  query.exec (err, ladderLevels) ->
    throw err if err
    ladderLevels = _.pluck ladderLevels, "original"
    findLadderLevelSessions ladderLevels[3], (err) ->
      throw err if err
    #async.each ladderLevels, findLadderLevelSessions, (err) ->
    #  throw err if err
serverSetup.connectToDatabase()
transpileLadderSessions()
    
