restructure cg header files