Cleaned up generation of Endpoint Urls