       {result, _error_code} = System.cmd("make", ["-f", "Makefile.mix", "priv/lib/fxml.so"], stderr_to_stdout: true)
       Mix.shell.info result
     end
+    Mix.Project.build_structure
+  end
+end
+
+defmodule Mix.Tasks.Clean.FastXML do
+  @shortdoc "Cleans helper in c_src"
+
+  def run(_) do
+    {result, _error_code} = System.cmd("make", ["-f", "Makefile.mix", "clean"], stderr_to_stdout: true)
+    Mix.shell.info result
+
     :ok
   end
 end
- 
-defmodule Mix.Tasks.Clean.Make do
-  @shortdoc "Cleans helper in c_src"
-  
-  def run(_) do
-    {result, _error_code} = System.cmd("make", ["-f", "Makefile.mix", "clean"], stderr_to_stdout: true)
-    Mix.shell.info result
-    
-    :ok
-  end
-end


  def application do
    [mod: {:fast_xml, []}]
    end
     
  defp package do
    [# These are the default files included in the package
     files: ["src", "lib", "c_src/*.c", "mix.exs", "rebar.config", "rebar.config.script", "Makefile.mix", "priv", "include", "README.md", "LICENSE.txt"],


  defp aliases do
    # Execute the usual mix clean and our Makefile clean task
    [clean: ["clean", "clean.fastXML"]]
  end
end

# Define
defmodule Mix.Tasks.Compile.FastXML do
  @shortdoc "Compiles helper in c_src"

  # TODO refactor
  def run(_) do
    if match? {:win32, _}, :os.type do
      {result, _error_code} = System.cmd("nmake", ["/F", "Makefile.mix", "priv\\lib\\fxml_stream.dll"], stderr_to_stdout: true)
