Refactor remote APIs

Let's try using a common protocol for the API calls, but initialize the
APIs differently.

Also standardize protocol responses