Split codegen into separate component