I offer personnel one on one help in the ASK Kev section, unfortunately this section is for supporting XT660.com members only, it would be unfair to the supporting members who have paid there membership fees for me to help you out in detail. What I can tell you is code 30 is for the lean anlge sensor we have seen a few problems with them, you need to read the workshop manual to see what the readings should be in the diagnostic screen. With code 50 you need to make sure the fuel pump runs at start up & check a few other things related to the engine ECU.
If you would like to become a supporting member it only costs a Teena & helps us keep this forum running. I receive no financial gain from the ASK KEV section at all, I also pay my 10 Pounds supporting Fee every year like the other supporting members, hope you understand.
http://www.xt660.com/payments.php
If you don't wish to join that's no problem, I am sure one of the members will be along to guide you through your problem.