 
   defp map_difference(map1, map2) do
     {surplus, altered, same} =
-      Enum.reduce(map1, {[], [], []}, fn({key, val1}, {surplus, altered, same}) ->
+      Enum.reduce(map1, {[], [], []}, fn {key, val1}, {surplus, altered, same} ->
         case Map.fetch(map2, key) do
           {:ok, ^val1} ->
             {surplus, altered, [{key, val1} | same]}
+
           {:ok, val2} ->
             {surplus, [{key, {val1, val2}} | altered], same}
+
           :error ->
             {[{key, val1} | surplus], altered, same}
         end
       end)
-    missing = Enum.reduce(map2, [], fn({key, _} = pair, acc) ->
-      if Map.has_key?(map1, key), do: acc, else: [pair | acc]
-    end)
+
+    missing =
+      Enum.reduce(map2, [], fn {key, _} = pair, acc ->
+        if Map.has_key?(map1, key), do: acc, else: [pair | acc]
+      end)
+
     {surplus, altered, missing, same}
   end
 

  end

  defp script_tuple({tuple1, index1}, {_, index2} = right, acc)
      when index1 > index2 do
    elem = elem(tuple1, index1)
    elem_diff = [del: ", ", del: inspect(elem)]
    script_tuple({tuple1, index1 - 1}, right, [elem_diff | acc])
  end

  defp script_tuple({_, index1} = left, {tuple2, index2}, acc)
      when index1 < index2 do
    elem = elem(tuple2, index2)
    elem_diff = [ins: ", ", ins: inspect(elem)]
    script_tuple(left, {tuple2, index2 - 1}, [elem_diff | acc])

    {surplus, altered, missing, same} = map_difference(left, right)

    keywords? =
      Inspect.List.keyword?(surplus) and Inspect.List.keyword?(altered) and
        Inspect.List.keyword?(missing) and Inspect.List.keyword?(same)

    result =
      Enum.reduce(missing, [], fn {key, val}, acc ->
        map_pair = format_key_value(key, val, keywords?)
        [[ins: ", ", ins: map_pair] | acc]
      end)

    result =
      if same == [] and altered == [] and missing != [] and surplus != [] do
        [[_ | elem_diff] | rest] = result
