     do_macro(eval, elixirscript_env)
   end
 
-  def do_macro(eval, elixirscript_env) do
+  defp do_macro(eval, elixirscript_env) do
     {env, _} = Code.eval_string(eval, [], elixirscript_env.env)
     %{ elixirscript_env | env: env }
   end

    module
  end

  def add_alias(env, module_name, alias_name) do
    module = get_module(env, module_name)
    %{ env | aliases: Enum.uniq(env.aliases ++ [{alias_name, module.name}]) }
  end

  def add_import(env, module_name) do
    case ElixirScript.Translator.State.is_module_loaded?(module_name) do
      true ->
        add_import_macro(env, module_name, [])
      false ->
        module = get_module(env, module_name)

        %{ env | requires: Enum.uniq(env.requires ++ [module.name]),
           functions: env.functions ++ [{ module.name, module.functions }],
           macros: env.macros ++ [{ module.name, module.macros }] }
    end
  end

  def add_import(env, module_name, [only: :functions]) do
    case ElixirScript.Translator.State.is_module_loaded?(module_name) do
      true ->
        add_import_macro(env, module_name, [only: :functions])
      false ->
        module = get_module(env, module_name)

        %{ env | functions: List.keydelete(env.functions, module_name, 0) ++ [{ module.name, module.functions }],
           macros: List.keydelete(env.macros, module.name, 0),
           requires: Enum.uniq(env.requires ++ [module.name]) }
    end
  end

  def add_import(env, module_name, [only: :macros]) do
    case ElixirScript.Translator.State.is_module_loaded?(module_name) do
      true ->
        add_import_macro(env, module_name, [only: :macros])
      false ->
        module = get_module(env, module_name)

        %{ env | macros: List.keydelete(env.macros, module_name, 0) ++ [{ module.name, module.macros }],
           functions: List.keydelete(env.functions, module.name, 0),
           requires: Enum.uniq(env.requires ++ [module.name]) }
    end
  end

  def add_import(env, module_name, [only: only]) do
    case ElixirScript.Translator.State.is_module_loaded?(module_name) do
      true ->
        add_import_macro(env, module_name, [only: only])
      false ->
        module = get_module(env, module_name)

      macros = Enum.filter(module.macros, fn(mac) ->
        mac in only
      end)

    do_macro(eval, elixirscript_env)
  end

  defp add_require_macro(elixirscript_env, module, opts) do
    eval = """
    require #{inspect module}, #{inspect opts}
    __ENV__
