   end
 
   ## Private
-  defp get_option(server, option) do
+  defp get_server_options(server) do
     Registry.lookup(server)
-    |> Map.get(option)
   end
 
   defp normalize_coder(spec) when is_tuple(spec), do: spec
   defp normalize_coder(module) when is_atom(module), do: {module, []}
 
-  defp encode(server, value) do
-    coder = get_option(server, :coder)
+  defp encode(server_options, value) do
+    coder = server_options.coder
     apply(elem(coder, 0), :encode, [value, elem(coder, 1)])
   end
 
-  defp decode(server, value) do
-    coder = get_option(server, :coder)
+  defp decode(server_options, value) do
+    coder = server_options.coder
     apply(elem(coder, 0), :decode, [value, elem(coder, 1)])
   end
 
-  defp decode_response({:ok, value}, server) when is_binary(value) do
-    {:ok, decode(server, value)}
-  end
-  defp decode_response({:ok, value, cas}, server) when is_binary(value) do
-    {:ok, decode(server, value), cas}
-  end
-  defp decode_response(rest, _server), do: rest
-
-
-  defp decode_multi_response({:ok, values}, server) when is_list(values) do
-    {:ok, Enum.map(values, &(decode_response(&1, server)))}
-  end
-  defp decode_multi_response(rest, _server), do: rest
-
-  defp ttl_or_default(server, opts) do
+  defp decode_response({:ok, value}, server_options) when is_binary(value) do
+    {:ok, decode(server_options, value)}
+  end
+  defp decode_response({:ok, value, cas}, server_options) when is_binary(value) do
+    {:ok, decode(server_options, value), cas}
+  end
+  defp decode_response(rest, _server_options), do: rest
+
+
+  defp decode_multi_response({:ok, values}, server_options) when is_list(values) do
+    {:ok, Enum.map(values, &(decode_response(&1, server_options)))}
+  end
+  defp decode_multi_response(rest, _server_options), do: rest
+
+  defp ttl_or_default(server_options, opts) do
     if Keyword.has_key?(opts, :ttl) do
       opts[:ttl]
     else
-      get_option(server, :ttl)
+      server_options.ttl
     end
   end
 
-  defp key_with_namespace(server, key) do
-    namespace = get_option(server, :namespace)
+  defp key_with_namespace(server_options, key) do
+    namespace = server_options.namespace
     if namespace do
       "#{namespace}:#{key}"
     else

  def decr_cas(server, key, cas, opts \\ []) do
    defaults = [by: 1, default: 0]
    opts = Keyword.merge(defaults, opts)
    execute_k(server, :DECREMENT, [key, Keyword.get(opts, :by), Keyword.get(opts, :default), cas, ttl_or_default(server, opts)], opts)
  end

  @doc """

  @spec multi_set_cas(GenServer.server, [{binary, binary, integer}], Keyword.t) :: {:ok, [store_result]} | error
  def multi_set_cas(server, commands, opts \\ []) do
    op = if Keyword.get(opts, :cas, false), do: :SET, else: :SETQ
    server_options = get_server_options(server)
    commands = Enum.map(commands, fn {key, value, cas} -> {op, [key, value, cas, ttl_or_default(server_options, opts)], opts} end)
    execute_quiet_kv(server, commands, server_options)
  end

  @cas_error { :error, "Key exists" }
