   defp update_quoted(quoted) do
     Macro.prewalk(quoted, fn
       ({name, context, parms}) ->
-        context = if context[:import] == Kernel do
-          context = Keyword.update!(context, :import, fn(_) -> ElixirScript.Kernel end)
-        else
-          context
-        end
+        context =
+          if context[:import] == Kernel do
+            Keyword.update!(context, :import, fn(_) -> ElixirScript.Kernel end)
+          else
+            context
+          end
 
-      {name, context, parms}
+        {name, context, parms}
       (x) ->
         x
     end)

    { ast, state }
  end

  defp do_module_processing({:defmodule, context1, [{:__aliases__, _, name} = the_alias, [do: body]]}, state, opts) do
    { body, inner_modules } = make_inner_module_aliases(name, body)

    aliases = Enum.map(inner_modules, fn
      ({:defmodule, _, [{:__aliases__, _, inner_module_name}, [do: inner_module_body]]}) ->
        { :alias, [], [{:__aliases__, [alias: false], name ++ inner_module_name}, [as: {:__aliases__, [alias: false], inner_module_name }] ] }
    end)

    state = Enum.reduce(inner_modules, state, fn
      ({:defmodule, context1, [{:__aliases__, context2, inner_module_name}, [do: inner_module_body]]}, state) ->

        module_name = Utils.quoted_to_name({:__aliases__, [], tl(name) ++ inner_module_name})

    end
  end

  defp make_inner_module_aliases(body) do
    case body do
      nil ->
        { { :__block__, [], [] }, [] }

      {:__block__, context, list2 } ->
        { list2, inner_modules } = Enum.partition(list2, fn
          {:defmodule, _, [{:__aliases__, _, _inner_module_name}, [do: _inner_module_body]]} ->
            false
          _ ->
            true
      end)

        { {:__block__, context, list2}, inner_modules }
      {:defmodule, _, [{:__aliases__, context, _inner_module_name}, [do: _inner_module_body]]} = mod ->
        { {:__block__, context, [] }, [mod] }
      _ ->
        { body, [] }
