Added the ability to specify an environment when looking up a service.