As a lifelong gun owner and target shooting enthusiast, I'd be happy to get a licence to operate my guns, just like I need one to operate my car, drive a semi, use dangerous explosives, spray toxic chemicals, fly airplanes, practice medicine, open a restaurant, dispose of waste or other such activities.

Here's my proposal:
1) Operator applies for license / passes test and background check. Felony / domestic violence etc. on your rap sheet? Too bad, no guns, no bullets.
2) An operator's licence is required to purchase firearms, ammo or carry / operate a gun.
3) Impose the death penalty for carrying, operating, buying, selling without said license or committing any crime with a firearm.
4) Use licence fees to fund police, target black market weapon sales, provide education and fund other such initiatives to target the criminals.

Problem solved. Law abiding citizens can maintain their guns, criminals and crazies get the shaft