Move sendRequest into simple object

Probably going to have to do this once the Advanced API is supported
anyway.