       (apply assoc-in-bc this-part kvs))))
 
 
-(defn prep-for-uploading-to-client [results]
+(defn prep-main [results]
   (let [base-clusters (:base-clusters results)]
     (-> results
       ; REFORMAT BASE CLUSTERS

            updated-conv   (conv/conv-update conv votes)
            zid            (:zid updated-conv)]
        ; Format and upload main results
        (->> (format-conv-for-mongo prep-for-uploading-to-client updated-conv zid last-timestamp)
          (mongo-upsert-results (mongo-collection-name "main")))
        ; format and upload bidtopid results
        (->> (format-conv-for-mongo prep-for-uploading-bidToPid-mapping updated-conv zid last-timestamp)
          (mongo-upsert-results (mongo-collection-name "bidtopid")))
        ; Return the updated conv
        updated-conv)

        :n-cmts
        :pca
        :repness
        :zid
        :user-vote-counts
        :votes-base}))))


(defn format-for-mongo [prep-fn conv lastVoteTimestamp]
  (-> conv
    prep-fn
    ; core.matrix & monger workaround: convert to str with cheshire then back
    ch/generate-string
    ch/parse-string
    (assoc
      "lastVoteTimestamp" lastVoteTimestamp)))


