 
     from = Tintan.$._(options.src)
     target = Tintan.$._(options.target)
-    map = compilerMap from, /\.coffee$/, (f)-> path.join(target, f).replace(/\.coffee$/, '.js')
+    map = @map = compilerMap from, /\.coffee$/, (f)-> path.join(target, f).replace(/\.coffee$/, '.js')
 
     compile = @compile
     sources = (s for s of map)
     return false if sources.length == 0
+    compiled = (c for s, c of map)
 
     if options.atomic
-      for source, compiled of map
-        desc source
-        file compiled, [source], (->
-          compile [source], path.dirname(compiled), -> complete()
+      for s, c of map
+        file c, [s], (->
+          compile @prereqs, path.dirname(@name), -> complete()
         ), async: true
 
     Tintan.$.onTaskNamespace options.name, (name)->
       desc "Compile coffee-script sources into #{options.target}"
-      task name, sources, (->
+      if options.atomic
+        task name, compiled, (->
+          console.log 'compiled'.green + ' coffee-script sources into ' + options.target
+        ), async: true
+      else
+        task name, (->
           console.log 'compile'.bold + ' coffee-script sources into ' + options.target
-          compile sources, target, -> complete()
-      ), async: true
+          jake.mkdirP(path.dirname c) for c in compiled
+          compile [from], target, -> complete()
+        ), async: true
 
+    Tintan.$.onTaskNamespace options.name + ':clean', ->
+      desc "Clean coffee-script produced files from #{options.target}"
+      task 'clean', ->
+        fs.unlink c for c in compiled
     true
 
    compile: (files, target, cb)->
      coffee = path.join(require.resolve('coffee-script'), '../../../bin/coffee')
+     argv = ['--compile', '--output', target].concat files
      jake.mkdirP target
-     argv = ['--compile', '--output', target].concat files
      p = spawn coffee, argv
      p.stdout.on 'data', (data)-> process.stdout.write data
      p.stderr.on 'data', (data)-> process.stderr.write data


   invokeTask: ->
     jake.Task[@options.name].invoke()


Compilers =

  task 'compile', ->
    compiler.invokeTask() for compiler in compilers


  tintan.compile = (lang, args...)->
    Compiler = Compilers[lang]
    fail "Dont know how to compile #{lang}".red unless Compiler
