Moved environment to Uri object