Migrate internal changes

@meshy Review?