 
   @spec send_response(
     message ::  {:noreply, any}
-              | {:reply, atom, any}
-              | {:reply, atom, map | list | String.t | nil, any},
+              | {:reply, atom | list(atom), any}
+              | {:reply, atom | list(atom), map | list | String.t | nil, any},
     socket_state :: map,
     req :: :cowboy_req.req
   ) ::


  @typedoc "Response to browser."
  @type response ::
    {:reply, atom, any, any}
    | {:reply, atom, any}
    | {:noreply, any}

  @doc ~S"""

  def parse_command(payload) do
    command_data = Poison.decode!(payload)

    command =
      case String.split(command_data["command"], "/") do
        [one_command] -> one_command |> String.to_atom
        list_of_commands -> list_of_commands |> Enum.map(&String.to_atom/1)
      end

    case command_data["data"] do
      "" -> command
