Refactor _env_get as _env_set, which is more appropriate. Also add in decorator function @set_target_env