Move utils into core