          clause-current (map->where-clause selector current)
          query (str "SELECT feature "
                     "FROM " history ", " history-delta " "
-                    "WHERE " history-delta".action = 'I' " 
+                    "WHERE " history-delta".action = 'I' "
                     "AND " history ".version = " history-delta ".version "
                     "AND " clause-history
                     " UNION ALL "
-                    "SELECT feature " 
+                    "SELECT feature "
                     "FROM " current ", " current-delta " "
                     "WHERE " current-delta ".action = 'I' "
                     "AND " current ".version = " current-delta ".version "
                     "AND " clause-current)]
      (query-with-results-on-channel timeline query feature-from-json))))
 
-(defn versions-deleted-in-delta 
+(defn versions-deleted-in-delta
   ([timeline dataset collection] (versions-deleted-in-delta timeline {:dataset dataset :collection collection}))
   ([timeline selector]
    (let [history (qualified-history)

         current (qualified-current)
         current-delta (qualified-current-delta)
         clause-current (map->where-clause selector current-delta)
         query (str "SELECT " history-delta ".version as version " 
                    "FROM " history ", " history-delta " "
                    "WHERE " history-delta ".action = 'D' "
                    "AND " history ".version = " history-delta ".version "

  (str (name *timeline-schema*) "." (name *current-delta-table*)))

(defn map->where-clause
  ([clauses] (str/join " AND " (map #(str (name (first %1)) " = '" (second %1) "'") clauses)))
  ([clauses table] (str/join " AND " (map #(str table "." (name (first %1)) " = '" (second %1) "'") clauses))))

(defn- execute-query [timeline query]
