   end
 
   def init([]) do
-    settings = Farmbot.System.ConfigStorage.get_config_as_map()["settings"]
+    settings = ConfigStorage.get_config_as_map()["settings"]
     user_env = Poison.decode!(settings["user_env"])
-    initial_state = struct(__MODULE__, configuration: Map.delete(settings, "user_env"), user_env: user_env)
-    state = %{initial_state | informational_settings: %{initial_state.informational_settings | node_name: node()}}
-    {
-      :producer_consumer,
-      state,
-      subscribe_to: [Farmbot.Firmware, Farmbot.System.ConfigStorage.Dispatcher, Farmbot.System.GPIO],
+    state_opts = [
+      configuration: Map.delete(settings, "user_env"),
+      user_env: user_env
+    ]
+    initial_state = struct(__MODULE__, state_opts)
+    info_settings = %{initial_state.informational_settings | node_name: node()}
+    state = %{initial_state | informational_settings: info_settings}
+    gen_stage_opts = [
+      subscribe_to: [Firmware, ConfigStorage.Dispatcher, Farmbot.System.GPIO],
       dispatcher: GenStage.BroadcastDispatcher
-    }
+    ]
+    {:producer_consumer, state, gen_stage_opts}
   end
 
   def handle_events(events, _from, state) do

    GenStage.call(__MODULE__, {:set_busy, bool})
  end

  @valid_sync_status [:maintenance, :sync_error, :sync_now, :synced, :syncing, :unknown]
  @doc "Set the sync status above ticker to a message."
  def set_sync_status(cmd) when cmd in @valid_sync_status do
    GenStage.call(__MODULE__, {:set_sync_status, cmd})

  @env Farmbot.Project.env()

  alias Farmbot.CeleryScript.AST
  alias Farmbot.System.ConfigStorage
  import ConfigStorage, only: [update_config_value: 4]
  alias Farmbot.Firmware
  use Farmbot.Logger

  def download_progress_fun(name) do
    alias Farmbot.BotState.JobProgress
    fn(bytes, total) ->
      {do_send, prog} = cond do
        # if the total is complete spit out the bytes,
        # and put a status of complete.
        total == :complete ->
          Logger.success 3, "#{name} complete."
          {true, %JobProgress.Bytes{bytes: bytes, status: :complete}}
