Switch environment from argument to context var