     /**
      Transmits the light switch state to the server
     
-     - Parameter lightsOn: A boolean value representing the light swithc state.
+     - Parameter lightsOn: A boolean value representing the light switch state.
      */
     public func sendLightSwitchState(lightsOn: Bool) {
         let lightSwitchStateDict = ["lightsOn" : lightsOn]

        }
    }
    
    /*
     * WebSocketDelegate functions implementation below:
     */
    public func websocketDidReceiveMessage(socket: WebSocket, text: String) {
        let JSONData = text.dataUsingEncoding(NSUTF8StringEncoding)

        do {
            lightSwitchStateDict = try NSJSONSerialization.JSONObjectWithData(JSONData!, options: NSJSONReadingOptions.AllowFragments) as? Dictionary<String, AnyObject>
        } catch let error {
            print("Failed deserializing the JSON object with \(error)")
        }
        if lightSwitchStateDict != nil {
            self.delegate?.lightSwitchClientDidReceiveChange(self, lightsOn: lightSwitchStateDict?["lightsOn"] as! Bool)
