     js_ast
   end
 
+  #Gets path to js files whether the mix project is available
+  #or when used as an escript
   defp operating_path do
     try do
       Mix.Project.build_path <> "/lib/elixir_script/priv"

  to the specified location
  """
  def copy_stdlib_to_destination(destination) do
    Enum.each(Path.wildcard(operating_path <> @js_core_path), fn(path) ->
      base = Path.basename(path)
      File.cp!(path, Path.join([destination, base]))
    end)
  end

  defp convert_to_code(js_ast) do
    process_module(js_ast)
    |> javascript_ast_to_code
  end

  defp process_module(module) do
    file_path = Utils.name_to_js_file_name(module.name) <> ".js"

    { file_path, Builder.program(module.body) }
  end

  defp javascript_ast_to_code({path, js_ast}) do
    js_code = js_ast
    |> prepare_js_ast
    |> Generator.generate

  defp create_code(compiler_opts) do

    parent = self
    state = ElixirScript.Translator.State.get

    Map.values(state.modules)
    |> Enum.reject(fn(ast) ->
