     {:ok, %{bus: bus, adapter_manager: adapter_manager, devices: [], adapters: [], bluez_manager: bluez_manager, module: module}}
   end
 
+  @doc false
   def handle_call(:get_adapters, _, state) do
     {:reply, state[:adapters], state}
   end
 
+  @doc false
   def handle_call(:get_devices, _, state) do
     {:reply, state[:devices], state}
   end
 
+  @doc false
   def handle_info({:dbus_signal, _}, state) do
     GenServer.cast(state[:module], :get_adapters)
     {:noreply, state}
   end
 
+  @doc false
   def handle_cast(:get_adapters, state) do
     adapters = :dbus_proxy.children(state[:adapter_manager])
     |> Stream.map(fn (adapter) -> adapter |> String.split("/") |> Enum.at(-1) end)

    {:noreply, state}
  end

  def handle_cast({:device_found, device}, state) do
    state = case apply(state[:module], :device_found, [device]) do
      :ok ->

    GenServer.start_link(__MODULE__, [module, opts], name: module)
  end

  @doc """
  Starts Bluetooth discovery
  """
  def start_discovery(pid) do
    GenServer.cast(pid, :start_discovery)
  end

  @doc false
  def init([module, opts]) do
    {:ok, bus} = :dbus_bus_connection.connect(@dbus_type)
    {:ok, adapter_manager} = :dbus_proxy.start_link(bus, @dbus_name, @dbus_bluez_path)
