updated EnvironmentManager to start handling URLs more nicely.