         (js/Error.
           "find-ns-obj not supported when Closure optimization applied")))))
 
-(defn ns-interns* [sym]
-  (let [ns-obj (find-ns-obj sym)
-        ns (Namespace. ns-obj sym (atom nil))]
-    (letfn [(step [ret k]
-              (let [var-sym (symbol (demunge k))]
-                (assoc ret
-                  var-sym (Var. #(gobject/get ns-obj k)
-                            (symbol (str sym) (str var-sym)) {:ns ns}))))]
-      (reduce step {} (js-keys ns-obj)))))
-
 (defn create-ns
   ([sym]
    (create-ns sym (find-ns-obj sym)))
   ([sym ns-obj]
-   (create-ns sym (find-ns-obj sym)
-     (merge (ns-interns* 'cljs.core) (ns-interns* sym))))
-  ([sym ns-obj mappings]
-   (Namespace. ns-obj sym (atom mappings))))
+   (Namespace. sym ns-obj)))
 
 (defn find-ns [ns]
   (create-ns ns (find-ns-obj ns)))


(defn ns-name [ns-obj]
  (.-name ns-obj))

(defn ns-map [ns-obj]
  (.getMappings ns-obj))

(defn ns-resolve
  ([ns sym] (ns-resolve ns nil sym))
  ([ns env sym]
   (when-not (contains? env sym)
     (when-let [ns-obj (find-ns ns)]
       (Var. #(.find ns-obj (str sym))
         (symbol (str ns) (str sym)) {:ns ns-obj})))))

  ((if (symbol? name) symbol str)
    (demunge-str (str name))))

(deftype Namespace [obj name]
  Object
  (findInternedVar [this sym]
    (let [k (munge (str sym))]
      (when (gobject/containsKey obj k)
        (Var. #(gobject/get obj k)
          (symbol (str name) (str sym)) {:ns this}))))
  (getName [_] name)
  (toString [_]
    (str name))
