Cleaned up some code, attempted fix for UI staying

* Also changed manifest to filter non hardware keyboard devices.