     end
   end
 
-  defp make_inner_module_aliases(name, body) do
+  defp make_inner_module_aliases(body) do
     case body do
       nil ->
         { { :__block__, [], [] }, [] }
 
       {:__block__, context, list2 } ->
-        { list2, inner_modules } = Enum.partition(list2, fn(x) ->
-        case x do
-          {:defmodule, _, [{:__aliases__, _, inner_module_name}, [do: inner_module_body]]} ->
+        { list2, inner_modules } = Enum.partition(list2, fn
+          {:defmodule, _, [{:__aliases__, _, _inner_module_name}, [do: _inner_module_body]]} ->
             false
           _ ->
             true
-        end
       end)
 
         { {:__block__, context, list2}, inner_modules }
-      {:defmodule, _, [{:__aliases__, context, inner_module_name}, [do: inner_module_body]]} = mod ->
+      {:defmodule, _, [{:__aliases__, context, _inner_module_name}, [do: _inner_module_body]]} = mod ->
         { {:__block__, context, [] }, [mod] }
       _ ->
         { body, [] }

          {:defmodule, context1, [{:__aliases__, context2, name ++ inner_module_name}, [do: add_aliases_to_body(inner_module_body, this_module_aliases)]]},
          state, opts)
    end)

    body = case body do
             {:__block__, context, list } ->
               list = Enum.map(list, fn
               {:use, _, [module, _] } = using ->
                 {:use, handle_use_expression(using, module, opts) }
               {:use, _, [module] } = using ->
                 {:use, handle_use_expression(using, module, opts) }
               ast ->
                 {:expanded, ast}
             end)
             |> Enum.reduce([], fn
                 {:use, ast}, state ->
                   case ast do
                     {:__block__, _, list} ->
                       state ++ list
                     _ ->
                       state ++ [ast]
                   end

                 {:expanded, ast}, state ->
                   state ++ [ast]
               end)

               {:__block__, context, list}

             _ ->
               body
           end

    body = add_aliases_to_body(body, aliases)

    [%{name: Utils.quoted_to_name(the_alias), type: :module, ast: body }] ++ state
  end

  defp add_aliases_to_body(body, aliases) do

  alias ElixirScript.Translator.Utils
  alias ElixirScript.Translator.State

  @spec execute(map, map) :: map
  def execute(compiler_data, opts) do
    data = Enum.reduce(compiler_data.data, [], fn(data, list) ->
      quoted = update_quoted(data.ast)
