           rewatch()
 
   try
-    # If state polling mode is enabled, use it.
-    # Else use the native api.
-    #
-    # This is useful while watching remote directory.
-    # Such as the `fs.watch` won't catch the SMB server's file change event.
-    if opts.polling
-      fs.watchFile source, { interval: parseInt(opts.polling) }, compile
-    else
-      watcher = fs.watch source, compile
+    watcher = fs.watch source, compile
   catch e
     watchErr e
 
   rewatch = ->
-    if opts.polling
-      fs.unwatchFile source
-      fs.watchFile source, { interval: parseInt(opts.polling) }, compile
-    else
-      watcher?.close()
-      watcher = fs.watch source, compile
+    watcher?.close()
+    watcher = fs.watch source, compile
 
 
 # Watch a directory of files for new additions.
 watchDir = (source, base) ->
   readdirTimeout = null
   try
-    compile = ->
+    watcher = fs.watch source, ->
       clearTimeout readdirTimeout
       readdirTimeout = wait 25, ->
         fs.readdir source, (err, files) ->
           if err
             throw err unless err.code is 'ENOENT'
-
-            if opts.polling
-              fs.unwatchFile source
-            else
-              watcher.close()
-
+            watcher.close()
             return unwatchDir source, base
           for file in files when not hidden(file) and not notSources[file]
             file = path.join source, file

            sources.push file
            sourceCode.push null
            compilePath file, no, base

    if opts.polling
      fs.watchFile source, { interval: parseInt(opts.polling) }, compile
    else
      watcher = fs.watch source, compile

  catch e
    throw e unless e.code is 'ENOENT'


  ['-t', '--tokens',          'print out the tokens that the lexer/rewriter produce']
  ['-v', '--version',         'display the version number']
  ['-w', '--watch',           'watch scripts for changes and rerun commands']
]

# Top-level objects shared by all the functions.
