   end
 
   defp restart_transports do
-    :ok = Supervisor.terminate_child(Farmbot.Bootstrap.Supervisor, Farmbot.BotState.Transport.Supervisor)
-    case Supervisor.restart_child(Farmbot.Bootstrap.Supervisor, Farmbot.BotState.Transport.Supervisor) do
+    alias Farmbot.Bootstrap
+    alias Farmbot.BotState
+    bs_sup = Bootstrap.Supervisor
+    tp_sup = BotState.Transport.Supervisor
+    :ok = Supervisor.terminate_child(bs_sup, tp_sup)
+    case Supervisor.restart_child(bs_sup, tp_sup) do
       {:ok, _} -> :ok
       {:error, :running} -> :ok
       {:error, {:already_started, _}} -> :ok

  use GenServer
  use Farmbot.Logger
  alias Farmbot.System.ConfigStorage

  # 30 minutes.
  @refresh_time 1.8e+6 |> round()

  end

  defp fetch_email do
    email = get_config_value(:string, "authorization", "email")
    email || raise "No email provided."
  end

  defp fetch_pass do
    pass = get_config_value(:string, "authorization", "password")
    pass || raise "No password provided."
  end

  defp fetch_server do
    server = get_config_value(:string, "authorization", "server")
    server || raise "No server provided."
  end
end
