Migrate to new APIs

Addresses issue #7