remove code that has already been refactored
- check for valid device before using it
- disconnect the device when not in use and reconnect when streaming starts