Refactor state
Last-event-id is state