Add 'new_env' static function (#169)
make 'new_env' a free function
Manual merge of branch 'origin/feature/new-env' (#169)