         ;; finally, construct a new CCI object
         (vector name (->CCI name data))))))
 
-(defn- buildccis [ipath interfaces]
-  (into {} (map (fn [interface] (buildcci ipath interface)) interfaces)))
-
-(defn- buildfacts [config]
+(defn- build-ccis [ipath interfaces]
+  (into {} (map (fn [interface] (build-cci ipath interface)) interfaces)))
+
+(defn- build-facts [config]
   (let [facts [["Application Name" (:Name config)]
                ["Application Version" (:Version config)]
                ["Platform" (str (-> config :Platform :Name) " version " (-> config :Platform :Version))]

;; emit-stub
;;-----------------------------------------------------------------
(defn- emit-stub [base name functions template srcdir filename]
  (let [[_ interface] (buildinterface base name functions)
        content (render-golang template [["base" base]["intf" interface]])
        output (io/file srcdir (package-path base name) filename)]

    (emit-golang output content)))

(defn- emit-server-stub [base name functions srcdir]
  (emit-stub base name functions "server" srcdir "server-stub.go"))


;; buildX - build our ST friendly objects
;;-----------------------------------------------------------------

(defn- build-function [{:keys [rettype functionName param index]}]
  (vector functionName (->Function (when (not= rettype "void") rettype) functionName param index)))

(defn- build-functions [functions]
  (into {} (for [[k v] functions]
             (build-function v))))

(defn- build-interface [base name interface]
  (let [transactions (build-functions (:transactions interface))
        queries (build-functions (:queries interface))]
    (vector name (->Interface name (package-name name) (package-camel name) (package-path base name) transactions queries))))

(defn- build [base interfaces]
  (into {} (map (fn [[name interface]] (build-interface base name interface)) interfaces)))

(defn- build-cci [ipath name]
  (let [path (io/file ipath (str name ".cci"))
        os (ByteArrayOutputStream.)]

