Add 'new_env' static function (#169)