Port the plugins to not use EnvName.

This branch introduces another intermediate structure that provides a method to prepare the environment.