   end
 
   def decode_type(<<cluster_id :: 32, position :: 32, rest :: binary>>, :link, _) do
-    {%MarcoPolo.RID{cluster_id: cluster_id, position: position}, rest}
+    {%RID{cluster_id: cluster_id, position: position}, rest}
   end
 
   def decode_type(data, :link_list, _) do

  protocol. This happens because this function is usually called from the parser
  that parsed the byte array.
  """
  @spec decode(binary, Dict.t) :: MarcoPolo.Record.t
  def decode(data, schema \\ %{}) do
    <<_serialization_version, rest :: binary>> = data


    byte_size(nkeys) + Enum.sum(key_lengths)
  end

  defp infer_type(%HashSet{}),               do: :embedded_set
  defp infer_type(%Document{}),              do: :embedded
  defp infer_type(%RID{}),                   do: :link
  defp infer_type(%MarcoPolo.DateTime{}),    do: :datetime
  defp infer_type(%Decimal{}),               do: :decimal
  defp infer_type(val) when is_boolean(val), do: :boolean
