     public var autoAcceptGuests = true
     
     static let defaultTimeout: NSTimeInterval = 10
-//    private let _serviceAdvertiser: MCNearbyServiceAdvertiser!
-//    private let _serviceBrowser: MCNearbyServiceBrowser!
     private var serviceAdvertiser: MCNearbyServiceAdvertiser?
     private var serviceBrowser: MCNearbyServiceBrowser?
     private var foundHosts = [MCPeerID]()

        if self.serviceAdvertiser == nil {
            serviceAdvertiser = MCNearbyServiceAdvertiser(peer: myPeerId,
                                                          discoveryInfo: ["peerType": "host"], serviceType: serviceType)
            self.serviceAdvertiser?.delegate = self
        }
        self.serviceAdvertiser?.startAdvertisingPeer()
    }
    
    public func stopAdvertisingHost() {
        serviceAdvertiser?.stopAdvertisingPeer()
        serviceAdvertiser = nil
    }
    
    // MARK: Methods for guest
    public func startSearchingForHosts() {
        stopAdvertisingHost()
        self.host = nil
        if serviceBrowser == nil {
            serviceBrowser = MCNearbyServiceBrowser(peer: myPeerId, serviceType: serviceType)
            serviceBrowser?.delegate = self
        }
        foundHosts = []
        serviceBrowser?.startBrowsingForPeers()
    }
    
    public func stopSearchingForHosts() {
        serviceBrowser?.stopBrowsingForPeers()
        serviceBrowser = nil
    }
    
    public func connectToHost(host: MCPeerID, context: NSData? = nil, timeout: NSTimeInterval = defaultTimeout) {

                // If currently a guest, stop looking for host
                stopSearchingForHosts()
                
                if self.host == peerID {
                    // Pass to delegate
                    delegate?.connectedToPeer(peerID)
                }
            } else {
                DLog("%@", "not connected to \(session.hashValue)")
                // If self is disconnected or current host is disconnected
                print("passed in \(session.connectedPeers)")
                print("self: \(self.session.connectedPeers)")
                print(session == self.session)
                
                if self.host == nil {
                    DLog("%@", "Host was removed")
                    
                    if self.host == peerID {
                        dispatch_sync(dispatch_get_global_queue(QOS_CLASS_USER_INITIATED, 0)) {
                            self.session.disconnect()
                        }
                    }
                    delegate?.disconnectedFromSession()
                }
            }
