       resp.send "There is no active question!"
 
   checkScore: (resp, name) ->
-    score = scoreKeeper.scoreForUser(name)
+    score = @scoreKeeper.scoreForUser(name)
     resp.send "#{name} has #{score} points."
 
   leaderBoard: (resp, topOrBottom, amount) ->
     op = []
-    tops = scoreKeeper[topOrBottom](amount)
+    tops = @scoreKeeper[topOrBottom](amount)
 
     for i in [0..tops.length-1]
       op.push("#{i+1}. #{tops[i].name} : #{tops[i].score}")


  saveUser: (user) ->
    @robot.brain.data.scores[user] = @cache.scores[user]
    @robot.brain.emit('save', @robot.brain.data)

    @cache.scores[user]

  add: (user, value) ->
    user = @getUser(user)
    @cache.scores[user] += value
    @saveUser(user, from)

  scoreForUser: (user) -> 
    user = @getUser(user)

        value = @currentQ.value.replace /[^0-9.-]+/g, ""
        @robot.logger.debug "#{name} answered correctly."

        value = parseInt value
        newScore = @scoreKeeper.add(name, value)
        if newScore? then msg.send "#{name} has #{newScore} points."

