 
     override init(frame frameRect: NSRect) {
         super.init(frame: frameRect)
-
+        
         backgroundView = NSView(frame: NSZeroRect)
         backgroundView.wantsLayer = true
         backgroundView.layer!.cornerRadius = 5
         backgroundView.layer!.backgroundColor = NSColor.NSColorFromHex(messagesGray).CGColor
         addSubview(backgroundView)
+        
+        mmsView = NSView(frame: NSZeroRect)
+        mmsView.wantsLayer = true
+        addSubview(mmsView)
         
         timeLabel = NSTextField(frame: NSZeroRect)
         timeLabel.backgroundColor = NSColor.clearColor()

                switch(dict.content_type!) {
                case "image/jpeg", "image/jpg", "image/png", "image/gif", "image/bmp":
                    contenttype += 1
                    let imageview = NSImageView(frame: NSMakeRect(0, 0, 150, 150))
                    mmsView.addSubview(imageview)
                    imageview.imageScaling = .ScaleProportionallyDown
                    


    //var backgroundView: NSImageView!
    var backgroundView: NSView!
    var mmsView: NSView = NSView(frame: NSZeroRect)

    var orientation: Orientation = .Left
    static let font = NSFont.systemFontOfSize(NSFont.systemFontSize())
