Migrating bulk of code to core