[CORE] Introduce codegen structure