renamed discoveryUrl to url, added optional string constructor