anchor.diff:  %% Convinience function for asynchronously transpiling erl files into core_ast files, and synchronously
   %% returning after all processes finish.
   transpile(Files, Outdir, Type) ->
  +    ok = is_valid_type(Type),
       Pids = [spawn_transpilation_process(File, Type, self()) || File <- Files],
   
  -    %% Pass transpilated results into codegen.js to get JavaScript which we can write to a file
  +    % Write results to file
       [
           receive {Pid, {Module, Data}} ->
  -            write_other(io_lib:format("~p",[Data]), Module, Type, Outdir)
  +            write_other(io_lib:format("~p", [Data]), Module, Type, Outdir)
           end
           || Pid <- Pids
  -    ],
  -    pkgutils:pkg_clean_tmp_dir().
  +    ].
   
   %% Spawns a process which performs transpilation for any given file.
   %% Returns output to the spawning process
  
positive.code:     transpile(Files, Outdir, core_ast),
      transpile(Files, Outdir, js_ast),
      transpile(Files, Outdir, js);
  branch(_Help = false, _Vsn = false, Outdir, Type, Files) when (length(Files) > 0) and ( (Type==js) or (Type==js_ast) or (Type==core_ast) or (Type==core) )->
      transpile(Files, Outdir, Type);
  branch(_Help = true, _Vsn = false, _OutDir, _Type, _Files = []) ->
      throw(help);
  
negative.code:             Matches ->
                  Accumulator ++ Matches
          end
      end, [], FileList).
  
  %% Checks whether a given type is a valid one, and if so, returns ok.
  %% Otherwise throws an error.
  is_valid_type(String) when is_list(String) ->
      is_valid_type(list_to_atom(String));
  is_valid_type(String) when is_binary(String) ->
      is_valid_type(binary_to_list(String));
  
  is_valid_type(js) ->
      ok;
  is_valid_type(js_ast) ->
      ok;
  is_valid_type(core) ->
      ok;
  is_valid_type(core_ast) ->
      ok;
  is_valid_type(all) ->
      ok;
  is_valid_type(Type) ->
      throw({invalid_type, Type}).