Migrate to new APIs