Removed unneeded import
Reorganized some code in KeyControlFragment