a smal refactoring to generate more complete environment+dependencies tree
Merge pull request #1632 from witlessbird/environment_factory

a smal refactoring to generate more complete environment+dependencies tree