Kodiak Wolverine engine swap

I have an 03 Kodiak 450 and put a 08 Wolverine 450 motor in it, The wolverine had been wrecked and totaled at 500 miles. I heard the engine run perfectly before I removed it.

After a few mods on the front drive shaft and a axle swap. Started plugging the wiring harness the Kodiak to the Wolverine motor, everything was plug and play except for the gear indicator wires,

Started it up and the valves were rattling pretty good. I drove it around some and it died a couple times so I shut it down.

I’m thinking that the Kodiak CDI is the problem with the Wolverine motor running so poorly? The wrong CDI is telling it to fire at the wrong time?

What do yall think?

Thank you