 
     new KDNotificationView options
 
-  setPresenceHandlers: ->
-    @userRef = @usersRef.child @nickname
-
-    @timestampInterval = @utils.repeat 1000, =>
-      @userRef.child("timestamp").set new Date().getTime(), (err) =>
-        return  unless err
-        @utils.killRepeat interval
-
-    @pingHostInterval = @utils.repeat 2000, @bound "pingHost"  unless @amIHost()
+  setPresenceHandler: ->
+    if @amIHost()
+      @presenceInterval = @utils.repeat 10000, =>
+        @userRef.child("timestamp").set Date.now(), (err) =>
+          return  unless err
+          @utils.killRepeat @presenceInterval
+    else
+      @presenceInterval = @utils.repeat 10000, @bound "pingHost"
 
     @once "KDObjectWillBeDestroyed", =>
-      @killConnectionTimers()
+      @killPresenceTimer()
 
   checkHost: (snapshot, callback) ->
-    unless host = snapshot.val()
-      @showNotActiveView()
-      @killConnectionTimers()
-      return
-
-    diff = new Date().getTime() - host.timestamp
-
-    if diff <= 5000
+    host = snapshot.val()
+    return @showNotActiveView()  unless host
+
+    diff = Date.now() - host.timestamp
+
+    if diff <= 15000
       @hideNotification()
       @hostStatus = "online"
-    else if diff >= 20000
+    else if diff >= 30000
       @hideNotification()
       @showNotActiveView()
       @hostStatus = "offline"
-    else if diff >= 5000
+    else if diff >= 15000
       @showNotification "Host is experiencing connectivity issues"
       @hostStatus = "unknown"
 


      # TODO: Each time we are fetching user data that we already have. Needs to be fixed.
      KD.remote.api.JAccount.some { "profile.nickname": { "$in": usernames } }, {}, (err, jAccounts) =>
        @users[user.profile.nickname] = user for user in jAccounts
        @emit "WorkspaceUsersFetched"

  createPanel: (callback = noop) ->

    @watchRef       = @workspaceRef.child "watch"
    @usersRef       = @workspaceRef.child "users"
    @userRef        = @usersRef.child KD.nick()
    @requestPingRef = @workspaceRef.child "requestPing"
    @sessionKeysRef = @firebaseRef.child  "session_keys"

  syncWorkspace: ->
    @workspaceRef.once "value", (snapshot) =>
      if @getOptions().sessionKey
        unless snapshot.val()?.keys
          @showNotActiveView()
          return false

      isOldSession = keys = snapshot.val()?.keys
      if isOldSession
        @isOldSession = yes
        @sessionData  = keys
        @createPanel()
      else
        @createPanel()
        @workspaceRef.set "keys": @sessionData

      if not isOldSession
        @addToHistory { message: "$0 started the session", by: KD.nick() }

      @watchRef.child(@nickname).set "everybody"
      @sessionKeysRef.child(@nickname).set @sessionKey
      @userRef.child("status").set "online"

      @loader.destroy()
      @chatView?.show()

      @emit "WorkspaceSyncedWithRemote"

  bindRemoteEvents: ->
    if @amIHost() then @syncWorkspace()
    else
      @requestPingFromHost()

    @usersRef.on "child_added", (snapshot) =>
      @fetchUsers()
