Implemented toggle functionality for the bluetooth menu button. Added a setupUiEvents function. Cleaned up some code.