added client state and editor message handling