improve caper_cpg.cpp readability