     |> Enum.filter(&(String.ends_with? &1, ".html"))
     |> Enum.each(&(File.rm_rf! "#{dir}site/#{&1}"))
 
-    Enum.map(info, fn x ->
-      Task.async fn ->
-        txt = File.read!("#{dir}pages/#{x.name}.#{x.type}")
-        html = case x.type do
-          "md" -> Earmark.to_html txt
-          "html" -> txt
-        end
-        html = render(template, proj ++ [contents: html])
-               |> genpage(proj ++ [page_title: x.title])
-        File.open! "#{dir}site/#{x.name}.html", [:write, :utf8], fn device ->
-          IO.write device, html
-        end
-        IO.puts "  GEN  #{dir}pages/#{x.name}.#{x.type} -> #{dir}site/#{x.name}.html"
-      end
-    end)
+    Enum.map(info, &(Task.async Serum.Build, :page_task, [dir, proj, &1, template]))
     |> Enum.each(&(Task.await &1))
+  end
+
+  def page_task(dir, proj, info, template) do
+    txt = File.read!("#{dir}pages/#{info.name}.#{info.type}")
+    html = case info.type do
+      "md" -> Earmark.to_html txt
+      "html" -> txt
+    end
+    html = render(template, proj ++ [contents: html])
+           |> genpage(proj ++ [page_title: info.title])
+    File.open! "#{dir}site/#{info.name}.html", [:write, :utf8], fn device ->
+      IO.write device, html
+    end
+    IO.puts "  GEN  #{dir}pages/#{info.name}.#{info.type} -> #{dir}site/#{info.name}.html"
   end
 
   def build_posts(dir, proj) do

      tmp = Enum.reduce m.tags, %{}, &(Map.put &2, &1, (Map.get &2, &1, []) ++ [m])
      Map.merge a, tmp, fn _, u, v -> MapSet.to_list(MapSet.new u ++ v) end
    end
    tasks_tag = Enum.map tagmap, fn {k, v} ->
      Task.async fn ->
        tagdir = "#{dir}site/tags/#{k.name}/"
        pt = "Posts Tagged \"#{k.name}\""
        File.mkdir_p! tagdir
        File.open! "#{tagdir}index.html", [:write, :utf8], fn device ->
          html = render(template_list, proj ++ [header: pt, posts: Enum.reverse(v)])
                 |> genpage(proj ++ [page_title: pt])
          IO.write device, html
        end
      end
    end

    Enum.each tasks_post ++ tasks_tag, &(Task.await &1)
  end

  defp process_links(contents, proj) do

    File.mkdir_p! dstdir

    infolist = mkinfo(dir, proj, files, [])
    tasks_post = Enum.map infolist, &(Task.async Serum.Build, :post_task, [srcdir, dstdir, proj, &1, template_post])

    IO.puts "Generating posts index..."
    File.open! "#{dstdir}index.html", [:write, :utf8], fn device ->
