 
   addFile: (filePath) ->
     if filePath not in @getFilePaths()
-      id = @pathToId filePath
-      @code.push
+      @code.push asCodeOb.call
         type: "file"
         filePath: filePath
-        uid: id
-
-      @devMapping[id] = filePath
+
 
   addRaw: (raw) ->
-    @code.push
+    @code.push asCodeOb.call
       type: "raw"
       raw: raw
-      uid: @getUID()
 
   getFilePaths: ->
     (ob.filePath for ob in @code when ob.type is "file")
 
   addUrl: (url) ->
-    if @urls.indexOf(url) is -1
+    if url not in @urls
       @urls.push url
-
-
-
-
-  readDev: (uid, cb) ->
-    filePath = @devMapping[uid]
-    return cb new Error "No such dev file #{ uid }" unless filePath
-
-    fs.readFile filePath, (err, data) =>
-      return cb err if err
-      @getCompiler(filePath) data.toString(), (err, code) ->
-        cb err, code
-
-  getCompiler: (filePath) ->
-    compiler = @compilers[extension filePath]
-    if not compiler
-      throw new Error "Could not find compiler for #{ filePath }"
-    compiler.render
 
 
 

      tags += "\n"
    else
      for ob in @code
        tags += @wrapInTag "/pile/#{ @name }.dev-#{ ob.type }-#{ ob.uid }.#{ @ext }", "id=\"pile-#{ ob.uid }\""
        tags += "\n"

    tags

  # TODO: Could be better :S
  sequence = 0
  getUID: -> "seq#{ sequence++ }"

  getProductionUrl: ->
    "#{ @urlRoot }#{ @name }.min.#{ @ext }"


  pileUp: (cb) ->

    async.map @code, (codeOb, cb) =>
      codeOb.getCode (err, code) =>
        return cb? err if err
        cb null, @commentLine("#{ codeOb.type }: #{ codeOb.getId() }") + "\n#{ code }"

    , (err, result) =>
      return cb? err if err
