Removed global envi object. Now a required parameter for each extension.