Always encode urls according to RFC 3986
Refactor Environment