Added support for API3 and a few convenience methods.