[core] some clean up.