fixed bug whereby the api maintained state between calls
simplified provider and endpoint identification