 
   defp do_fetch(node, key, hash) do
     index = key_mask(hash)
-    case elem(node, index) do
-      [^key | v]   -> {:ok, v}
+
+    case elem(node, index) do
+      [^key | v] -> {:ok, v}
       {^key, v, _} -> {:ok, v}
-      {_, _, n}    -> do_fetch(n, key, key_shift(hash))
-      _            -> :error
+      {_, _, n} -> do_fetch(n, key, key_shift(hash))
+      _ -> :error
     end
   end
 
   defp do_put(node, key, value, hash) do
     index = key_mask(hash)
+
     case elem(node, index) do
       [] ->
         {put_elem(node, index, [key | value]), 1}
+
       [^key | _] ->
         {put_elem(node, index, [key | value]), 0}
+
       [k | v] ->
         n = put_elem(@node_template, key_mask(key_shift(hash)), [key | value])
         {put_elem(node, index, {k, v, n}), 1}
+
       {^key, _, n} ->
         {put_elem(node, index, {key, value, n}), 0}
+
       {k, v, n} ->
         {n, counter} = do_put(n, key, value, key_shift(hash))
         {put_elem(node, index, {k, v, n}), counter}

  def into(original) do
    # Avoid warnings about HashDict being deprecated.
    module = HashDict
    {original, fn
      dict, {:cont, {key, value}} -> module.put(dict, key, value)
      dict, :done -> dict
      _, :halt -> :ok
    end}
  end
end


  def delete(dict, key) do
    case dict_delete(dict, key) do
      {dict, _value} -> dict
      :error -> dict
    end
  end

  def pop(dict, key, default \\ nil) do
    case dict_delete(dict, key) do
      {dict, value} -> {value, dict}
      :error -> {default, dict}
    end
  end

