         when "retrieveLabels" then @retrieveLabels sendResponse
         when "saveSession" then @saveSession message.content, sendResponse
         when "newActivity" then @checkIfNeedNewContext sendResponse
-        when "getUserStudyWebsites" then @getUserStudyWebsites sendResponse
-        when "storeUserStudyWebsite" then @storeUserStudyWebsite message.content, sendResponse
-        when "deleteUserStudyWebsite" then @deleteUserStudyWebsite message.content, sendResponse 
         when "countDumpData" then @countDumpData sendResponse 
         when "countDumpedData" then @countDumpedData sendResponse 
         when "dumpData" then @dumpData sendResponse  

    @storageManager.clearStore "screenshots"
    try
      mem0ries = JSON.parse messageContent     
    catch error
      response = "Invalid json"
      sendResponse response
    
    count = 0
    for key, websites of mem0ries
      count = count + websites.length
    for key, websites of mem0ries
      for website in websites
        @storageManager.store "userStudySessions", website.userStudySession
        delete website.userStudySession
        @storageManager.store "temporary", website, () =>
          if count is 1
            sendResponse "Mem0r1es Loaded"
          else
            count--
  
  countMem0r1es : (sendResponse) =>
    query = new mem0r1es.Query().from("temporary")


  constructor : (@storageManager)->
    @currentCount = 0
    @initLastDump()
    @dumpServerURL = "http://127.0.0.1:8080/"
    @checkIfNeedNewContext()
    @dumpDailyData()
    console.log "Toolbox for the user study is ready"
  
  initLastDump : () ->
    lastDump = localStorage.getItem 'lastDump'    
    if not lastDump?
      localStorage.setItem 'lastDump', 0
  
  onMessage : (message, sender, sendResponse) ->
    switch(message.title)
