Refactor to allow for testing the API independent of callbacks