Handles generation of environments. Progress on issue #22