Added ability to set API URL