Moving assignment logic to Environment, does not belong in GlobalFnLibrary.