code cleanup; support for re-connection when BLE signal lost