allow stubbing of helper methods

moved the helpers to a helper object held in the API class, which allows it to get stubbed and mocked for testing purposes.