Migrate to cstubs