Change env to be a dict