Fix nopch compilation and move a CFBG function to CFBG class