   #--------------------------------------------
 
   $scope.remove_from_folder = ->
-    folder_id = $rootScope.current_feed.folder_id
-    $rootScope.current_feed.folder_id = 'none'
-    feed_removed_from_folder $rootScope.current_feed, folder_id
-
-    $http.put('/folders/none.json', folder: {feed_id: $rootScope.current_feed.id})
+    folder_id = currentFeedSvc.get().folder_id
+    currentFeedSvc.get().folder_id = 'none'
+    feed_removed_from_folder currentFeedSvc.get(), folder_id
+
+    $http.put('/folders/none.json', folder: {feed_id: currentFeedSvc.get().id})
     .error ->
       # Show alert
       $rootScope.error_managing_folders = true

  #--------------------------------------------

  $scope.show_start_page = ->
    unset_current_feed()
    $scope.loading_entries = false

  #--------------------------------------------

  #--------------------------------------------

  update_unread_count = (entries, increment)->
    if currentFeedSvc.get()
      # if current_feed has value, all entries belong to the same feed which simplifies things
      if increment
        currentFeedSvc.get().unread_entries += entries.length
      else
        currentFeedSvc.get().unread_entries -= entries.length
    else
      # if current_feed has null value, each entry can belong to a different feed
      # we process each entry individually
