move stuff into core