     GenServer.call(Boyle, :get_state)
   end
 
-  def reinstall do
+  def reinstall(env_path) do
     Mix.start()
     Mix.Project.pop()
 
-    File.cd!(environment_path(), fn ->
-      # Code.require_file("mix.exs")
+    File.cd!(env_path, fn ->
       Code.load_file("mix.exs")
       # Mix.Project.push(CustomEnvironment)
       # IO.inspect(CustomEnvironment.project())
       Mix.Task.run("deps.get")
       Mix.Tasks.Deps.Compile.run([])
     end)
+  end
+  def reinstall() do
+    reinstall(environment_path())
   end
 
   def paths do

			use Mix.Project

			def project do
				[build_per_environment: false,
         deps: deps(),
         app: :customenv,
         version: "1.0.0"]
			end

			def deps do


  def activate(name) do
    GenServer.call(Boyle, {:activate, name})
    reinstall()
  end

  def deactivate do
    Mix.Project.pop()
    Mix.Task.clear()
    # Mix.Shell.Process.flush()
    Mix.ProjectStack.clear_cache()
    # Mix.ProjectStack.clear_stack()
    env_path_trimmed = Path.join("envs", active_env_name())
    :code.get_path |> Enum.map(fn path ->
      # if path not in state().initial_paths do
      if String.contains?(to_string(path), env_path_trimmed) do
        Code.delete_path(path)
        Logger.debug("Removed path #{to_string(path)}")
      end
    end)
    :code.all_loaded |> Enum.map(fn {module, path} ->
      # if {module, path} not in state().initial_modules and
      if String.contains?(to_string(path), env_path_trimmed) do
        purge([module])
        Logger.debug("Purged module #{to_string(module)} : #{to_string(path)}")
      end
    end)
    GenServer.call(Boyle, {:activate, nil})
  end

  def install(new_dep) do
