AdrianC: Fix env
AdrianC: Simplified and made more robust env service domain