 
   @spec do_build_stage1(String.t, String.t, build_mode)
     :: Error.result(String.t)
+
   defp do_build_stage1(src, dest, mode) do
     IO.puts "Rebuilding Website..."
     BuildDataStorage.init self()

    results = [Task.await(t1), Task.await(t2)]
    # IndexBuilder must be run after PostBuilder has finished
    t3 = Task.async fn -> IndexBuilder.run src, dest, :parallel end
    results = results ++ [Task.await t3]
    Error.filter_results results, :launch_tasks
  end

  defp launch_tasks(:sequential, src, dest) do
    IO.puts "⌛️  \x1b[1mStarting sequential build...\x1b[0m"
    r1 = PageBuilder.run src, dest, :sequential
    r2 = PostBuilder.run src, dest, :sequential
    r3 = IndexBuilder.run src, dest, :sequential
    results = [r1, r2, r3]
    Error.filter_results results, :launch_tasks
  end

  @spec compile_nav() :: :ok
  defp compile_nav do
    IO.puts "Compiling main navigation HTML stub..."
    template = BuildDataStorage.get self(), "template", "nav"
    html = Renderer.render template, []
    BuildDataStorage.put self(), "navstub", html
  end

  @spec copy_assets(String.t, String.t) :: :ok
  defp copy_assets(src, dest) do
    IO.puts "Copying assets and media..."
    try_copy "#{src}assets/", "#{dest}assets/"

  end

  @spec try_copy(String.t, String.t) :: :ok

  defp try_copy(src, dest) do
    case File.cp_r src, dest do
      {:error, reason, _} ->
