Remove disconnected peripherals from `scannedPeripherals`

- Remove peripherals from `scannedPeripherals` when they are disconnected.
- Minor updates