   ((if (symbol? name) symbol str)
     (demunge-str (str name))))
 
-(deftype Namespace [obj name mappings]
+(deftype Namespace [obj name]
   Object
-  (find [this sym]
-    (when (contains? @mappings sym)
-      (Var. #(get @mappings sym)
-        (symbol (str name) (str sym)) {:ns this})))
   (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}))))
-  (getMappings [_]
-    @mappings)
   (getName [_] name)
   (toString [_]
     (str name))


(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})))))

        (js/Error.
          "find-ns-obj not supported when Closure optimization applied")))))

(defn create-ns
  ([sym]
   (create-ns sym (find-ns-obj sym)))
  ([sym ns-obj]
   (Namespace. sym ns-obj)))

(defn find-ns [ns]
  (create-ns ns (find-ns-obj ns)))
