minor refactoring, plus new Bluetooth device selection dialog