Update for API changes

Lots of stuff this time!