Is your clutch cable adjusted properly at both ends?
That's what I would start with.
if its wasnt correctly set then it would THUD , lurch and stall not just cut out when putting in gear, certainly an electrical issue as its a combo of safety cut out switches not opening/closing a circuit
He's not actually mentioned if any of this is happening or not though.
Gotta start with the obvious and easiest things first, so if it's clutch related then you must have the clutch cable set up correctly for starters so that it can be eliminated.
The cable could even be frayed inside as well, and simply need replacing.
By the way, i notice nobody has mentioned what a nightmare the sidestand switch is to replace, and it's in a horrible position to get access to, so take that into consideration as it is not a straightforward swap at all. Just thought i'd give a heads up on that one.