             Log(v: "Bluetooth state is powered off.")
         case .poweredOn:
             Log(v: "Bluetooth state is powered on")
+            // Throwaway command to init CoreBluetooth (helps prevent timing problems)
+            centralManager.retrievePeripherals(withIdentifiers: [])
         default:
             Log(v: "Bluetooth state is not in supported switches")
         }

        set {
            swiftyTeethLogger = newValue
        }
    }
}


    }
    
    // TODO: Hold a private set, and expose a list?
    public var scannedDevices = Set<Device>()

    public var isScanning: Bool {
        return centralManager.isScanning
    }

    // TODO: Should be a list? Can connect to > 1 device
    private var connectedDevices = [String:Device]()
    private var scanChangesHandler: ((Device) -> Void)?
    private var scanCompleteHandler: (([Device]) -> Void)?
    
    public override init() {
    }
