Move some stuff to core package