         m = messages = @redux.getStore(@name).get('messages')
         for x in changes
             if x.insert
-                #console.log('change', x.insert)
+                # console.log('Received', x.insert)
                 # OPTIMIZATION: make into custom conversion to immutable
-                x.insert.history = immutable.Stack(immutable.fromJS(x.insert.history))
-                x.insert.editing = immutable.Set(x.insert.editing)
-                messages = messages.set("#{x.insert.date - 0}", immutable.fromJS(x.insert))
+                message = immutable.fromJS(x.insert)
+                message = message.set('history', immutable.Stack(immutable.fromJS(x.insert.history)))
+                message = message.set('editing', immutable.Set(x.insert.editing))
+                messages = messages.set("#{x.insert.date - 0}", message)
             else if x.remove
                 messages = messages.delete(x.remove.date - 0)
         if m != messages

            @setState
                edited_message : @newest_content()
            @props.actions.set_editing(@props.message, false)
        else if e.keyCode==13 and not e.shiftKey # 13: enter key
            mesg = @refs.editedMessage.getValue()
            if mesg != @newest_content()
                @props.actions.send_edit(@props.message, mesg)


    getInitialState: ->
        edited_message  : @newest_content()
        new_changes     : false

    componentWillReceiveProps: (newProps) ->
        changes = false
        if @state.edited_message == @newest_content()
            @setState(edited_message : newProps.message.get('history')?.peek().get('content') ? '')
        else
            changes = true
        @setState(new_changes : changes)

    shouldComponentUpdate: (next, next_state) ->
        return @props.message != next.message or
