Moved debug to CG_Core