More cleanups in Core