             }
             
             //Set hidden timestamp
-            noDetailsCell!.hiddenTimeStamp.text = "\(dateFormatter.stringFromDate(NSDate(timeIntervalSince1970: self.ts[indexPath.row]![0])))"
+            noDetailsCell!.hiddenTimeStamp.text = "\(dateFormatter.stringFromDate(NSDate(timeIntervalSince1970: (self.chatMessageData[indexPath.row]?.timestamp)!)))"
             noDetailsCell!.hiddenTimeStamp.hidden = true
             noDetailsCell!.hiddenTimeStamp.textColor = UIColor.rocketTimestampColor()
             
-            //Set text to noDetailsMessage label
-            noDetailsCell!.noDetailsMessage.text = self.chatMessageData[indexPath.row]![2]
-            noDetailsCell?.noDetailsMessage.font = UIFont(name: "Roboto-Regular.ttf", size: 15)
-            
-            //Set color to #444444
-            noDetailsCell!.noDetailsMessage.textColor = UIColor.rocketSecondaryFontColor()
-            
-            return noDetailsCell!
-            
-        }
-            //If different user and joined the channel - return a full detailed cell
-        else if (!sameUser && self.chatMessageData[indexPath.row]![3] == "uj"){
+            
+            //If message is removed
+            if(self.chatMessageData[indexPath.row]!.messageType == "rm") {
+                
+                
+                //Set text to noDetailsMessage label
+                noDetailsCell!.noDetailsMessage.text = "removed message"
+                noDetailsCell?.noDetailsMessage.font = UIFont.italicSystemFontOfSize(15)
+                
+                //Set color to #444444
+                noDetailsCell!.noDetailsMessage.textColor = UIColor.rocketSecondaryFontColor()
+                
+                return noDetailsCell!
+            
+            }else{
+                
+                //Set text to noDetailsMessage label
+                noDetailsCell!.noDetailsMessage.text = self.chatMessageData[indexPath.row]!.message
+                noDetailsCell?.noDetailsMessage.font = UIFont(name: "Roboto-Regular.ttf", size: 15)
+                
+                //Set color to #444444
+                noDetailsCell!.noDetailsMessage.textColor = UIColor.rocketSecondaryFontColor()
+                
+                return noDetailsCell!
+                
+            }
+            
+            
+        }
+        //If different user and joined the channel - return a full detailed cell
+        else if (!sameUser && self.chatMessageData[indexPath.row]!.messageType == "uj"){
             
             var fullDetailsCell:MainTableViewCell? = mainTableview.dequeueReusableCellWithIdentifier("fullDetailsCell", forIndexPath: indexPath) as? MainTableViewCell
             

        if let t = notification.userInfo!["t"]{
            type = t as! String
        }
        self.chatMessageData[self.chatMessageData.count] = [notification.userInfo!["u"]!["_id"]! as! String, notification.userInfo!["u"]!["username"]! as! String, notification.userInfo!["msg"]! as! String,type]
        
        let timestamp = [notification.userInfo!["ts"]!["$date"] as! NSNumber]
        let timestampInDouble = timestamp as! [Double]
        self.ts[self.ts.count] =  [timestampInDouble[0] / 1000]
        
        //Reloading data and if we are at the bottom scroll the view to the last row
        self.mainTableview.reloadData()

        //Check if the next and previous user are the same to see what kind of cell we will create
        if(indexPath.row > 0){
            
            if(self.chatMessageData[indexPath.row]!.userId == self.chatMessageData[indexPath.row - 1]!.userId){
            
                sameUser = true
                
            }
