factory.py: add options to global_env