Re-encapsulate all functionality relevant to code generation inside CodeGenerator.