     if File.exists?(input_path) do
       unless File.exists?(output_path), do: File.mkdir_p!(output_path)
 
-      {digested_files, manifest} =
-        input_path
-        |> filter_files()
-        |> Enum.map(&digest/1)
-        |> generate_manifest()
-        |> add_digested_content()
+      files = filter_files(input_path)
+      manifest = generate_manifest(files)
+      digested_files = add_digested_content(files, manifest)
 
       digests = load_compile_digests(output_path)
       save_manifest(digested_files, manifest, digests, output_path)

      |> Map.new()

    new_digests = generate_new_digests(files)

    digests = Map.merge(old_digests_that_still_exist, new_digests)

    save_manifest(

      Path.basename(file_path) == "cache_manifest.json"
  end

  defp map_file(file_path, input_path) do
    stats = File.stat!(file_path)
    content = File.read!(file_path)

    basename = Path.basename(file_path)
    rootname = Path.rootname(basename)
    extension = Path.extname(basename)
    digest = Base.encode16(:erlang.md5(content), case: :lower)

    %{
      absolute_path: file_path,
      relative_path: file_path |> Path.relative_to(input_path) |> Path.dirname(),
      filename: basename,
      size: stats.size,
      content: content,
      digest: digest,
      digested_content: nil,
      digested_filename: "#{rootname}-#{digest}#{extension}"
    }
  end

  defp write_to_disk(file, output_path) do
