Refactors valid CC# generator