     pre({:import, meta, [module_info, []]}, acc)
   end
 
-  defp pre(ast = {:import, [line: line], [{_, _, module_atoms = [mod|_]}, _opts]}, acc) when is_atom(mod) do
+  defp pre({:import, [line: line], [{_, _, module_atoms = [mod|_]}, _opts]} = ast, acc) when is_atom(mod) do
     current_module  = acc.modules |> :lists.reverse |> Module.concat
     current_imports = acc.imports |> :lists.reverse |> List.flatten
     current_aliases = acc.aliases |> :lists.reverse |> List.flatten

    pre({:def, meta, [head, body]}, acc)
  end

  defp pre(ast = {def_fun, [line: line], [{name, _, params}, _body]}, acc) when def_fun in [:def, :defp] do
    current_module  = acc.modules |> :lists.reverse |> Module.concat
    current_imports = acc.imports |> :lists.reverse |> List.flatten
    current_aliases = acc.aliases |> :lists.reverse |> List.flatten

  end

  # alias without options
  defp pre({:alias, [line: line], [{:__aliases__, _, module_atoms = [mod|_]}]} = ast, acc) when is_atom(mod) do
    alias_tuple = {Module.concat([List.last(module_atoms)]), Module.concat(module_atoms)}
    do_alias(ast, line, alias_tuple, acc)
  end

  defp pre({:alias, [line: line], [{_, _, module_atoms = [mod|_]}, [as: {:__aliases__, _, alias_atoms = [al|_]}]]} = ast, acc) when is_atom(mod) and is_atom(al) do
    alias_tuple = {Module.concat(alias_atoms), Module.concat(module_atoms)}
    do_alias(ast, line, alias_tuple, acc)
  end

  defp pre({_, [line: line], _} = ast, acc) do
    current_module  = acc.modules |> :lists.reverse |> Module.concat
    current_imports = acc.imports |> :lists.reverse |> List.flatten
    current_aliases = acc.aliases |> :lists.reverse |> List.flatten
