   end
 
   defp ensure_correct_properties(app, properties) do
-    properties = Keyword.from_enum(properties)
-    properties = Keyword.put properties, :description,
-                             to_char_list(properties[:description] || app)
-    properties = Keyword.put properties, :registered, (properties[:registered] || [])
-    validate_properties(properties)
     properties
+    |> Keyword.put_new(:description, to_char_list(app))
+    |> Keyword.put_new(:registered, [])
+    |> validate_properties
   end
 
   defp validate_properties(properties) do

    end
  end

  defp validate_app(app) when is_atom(app), do: :ok
  defp validate_app(_), do: raise(Mix.Error, message: "Expected :app to be an atom")


    validate_app(app)
    validate_version(version)

    path = Mix.Project.compile_path
    mods = modules_from(Path.wildcard('#{path}/*.beam')) |> Enum.sort

    target  = Path.join(path, "#{app}.app")
    sources = Mix.Project.config_files

    if opts[:force] || Mix.Utils.stale?(sources, [target]) || modules_changed?(mods, target) do
      best_guess = [
        vsn: to_char_list(version),
        modules: mods,
        applications: [:kernel, :stdlib, :elixir]
      ]

      properties = if function_exported?(project, :application, 0) do
        Keyword.merge(best_guess, project.application)
      else
        best_guess
      end
