 			.map { (self, $0) }
 		return ensureValidPeripheralState(observable)
 	}
-
-	private func shouldBeIdentifierIncluded(identifier: CBUUID, forIdentifiers identifiers: [CBUUID]?) -> Bool {
-		if let identifiers = identifiers {
-			return identifiers.contains(identifier)
-		}
-		return true
-	}
 }
 
 extension Peripheral: Equatable { }

	public func discoverServices(serviceUUIDs: [CBUUID]?) -> Observable<[Service]> {
		let observable = peripheral.rx_didDiscoverServices
			.flatMap {
				(services, error) -> Observable<[Service]> in
				if let discoveredServices = services {
					let mapped = discoveredServices.map { Service(peripheral: self, service: $0) }
					guard let identifiers = serviceUUIDs else { return Observable.just(mapped) }
					let uuids = discoveredServices.map { $0.uuid }
					if Set(uuids) == Set(identifiers) {
						return Observable.just(mapped)
					}
					return Observable.empty()
				}

			.rx_didDiscoverCharacteristicsForService
			.filter { $0.0 == service.service }
			.flatMap { (cbService, error) -> Observable<[Characteristic]> in
				guard let rxCharacteristics = cbService.characteristics where error == nil else {
					return Observable.error(BluetoothError.CharacteristicsDiscoveryFailed(service, error))
				}
				let characteristics = rxCharacteristics.map { Characteristic(characteristic: $0, service: service) }
				guard let characteristicIdentifiers = identifiers else { return Observable.just(characteristics) }
                return Observable.just(characteristics.filter { characteristicIdentifiers.contains($0.UUID) })
            }
			.take(1)

