Perhaps we could simplify the “gun in bad hands” problem by treating firearm discharge like driving an automobile. If you want to discharge a firearm in the state, you need a “discharger endorsement” on your driver’s licence or state identification card.
Then have DMV set standards to be met in order to get the endorsement and, of course, collect a fee to issue the endorsement. (Hey, it might also help with the budget deficit!)
Also, require all firearms to have a RFID chip identifying the firearm’s owner. For those worried about the Second Amendment, recall the first three words: “A well regulated ...”
This wouldn’t address the problem of criminals with guns, but it might help with “kooks with guns” problem.