move some stuff out of core