             [org.httpkit.server :refer [with-channel on-close on-receive run-server send!]]
             [net.cgrand.enlive-html :refer [deftemplate set-attr append html substitute content]]
             [ceres.collector :refer [store set-db] :as collector]
-            [ceres.curator :refer [get-articles-count get-news-diffusion get-news-frequencies] :as curator]
+            [ceres.curator :refer [get-articles-count] :as curator]
             [ceres.executor :refer [start-executor]]
-            [gezwitscher.core :refer [start-filter-stream]]
+            [gezwitscher.core :refer [start-filter-stream gezwitscher]]
             [clojure.java.io :as io]
             [clojure.core.async :refer [close! put! timeout sub chan <!! >!! <! >! go go-loop] :as async]
             [taoensso.timbre :as timbre]))

  "Dispatch incoming websocket-requests"
  [{:keys [topic data] :as package}]
  (case topic
    :news-frequencies (assoc package :data (get-news-frequencies))
    :news-diffusion (assoc package :data (get-news-diffusion))
    :tweets-count (assoc package :data (curator/get-tweet-count))
    :init (assoc package :data
                 {:recent-articles (-> @server-state :app :recent-articles)

  (info @server-state)
  (when (:http-server? @server-state)
    (run-server (site #'all-routes) {:port (:port @server-state) :join? false}))
  (start-stream server-state)
  (when (:backup? @server-state)
    (start-executor (:backup-folder @server-state))))

