Fixed build of master branch, updated abstraction to handle API changes.